Reputation: 191
I'm working on a multi-lingual application which requires me to change the text direction (either ltr or rtl) dynamically according to the user language.
I used a label for this. I assigned it a css class which would set the direction but its not working.
I also added a style to its CssStyleCollection list but its not working too.
Where am I doing it wrong? What are the ways in which it can be achieved?
Upvotes: 0
Views: 2404
Reputation: 103377
If you post the CSS you're using, I may be able to identify anything that could be wrong with it. Otherwise, try this in your label control:
Label myLabel = new Label();
myLabel.Attributes.Add("dir", "rtl");
Of course, you may want to set the direction at a top-level tag such as the <body />
so it affects the entire page and not just one label.
Upvotes: 2