how to align text inside <select> <option>

admin

Administrator
Staff member
Hello<br />
<br />
I have an application that could be either in RTL or in LTR.<br />
This is set in dir attribute of the <html> tag<br />
<br />
I would like to display the text: "People [15]" inside an <option> tag.<br />
A problem occurs when the page is viewd in "RTL" mode.<br />
Then the text in the <option> tag reads: "[People 15]"<br />
<br />
This obviously wrong<br />
Here is a code segment that shows what I mean:<br />
<br />
<html dir="rtl"><br />
<body><br />
<select><br />
<option>People [15]</option><br />
</select><br />
</body><br />
</html><br />
<br />
<br />
I have noticed that providing the 'direction' style attibute to the <option> tag has no effect. I also tried dir="ltr" inside the tag, but still no effect.<br />
<br />
I noticed that this attribute has an effect on the entire <select> tag, but that causes the text to the left aligned, even though it should be right aligned (remember? <html dir="rtl">)<br />
<br />
setting the align attribute to the option tag has no effect too<br />
<br />
help would be appreciated<br />
Jason<!--content-->div { direction: rtl } <br />
<br />
Is what I assume you are talking about, I heard support was sketchy at best.<!--content-->the direction attribute doesn't work for the <option> tag.<br />
It does indeed on the <select> tag, but that caues the content of all the nested <option> tags to be aligned according to this direction.<br />
<br />
In my case, the content alignment should be OPPOSITE to the direction<!--content-->
 
Back
Top