Nik Kashi
Nik Kashi

Reputation: 4596

Safari browser: set <option> text align in <select> tag right

How can I set text direction of select option tag Right?

<select style="direction:rtl;text-align:right">
    <option value="" selected="">همه</option>
    <option value="1">راهبر سيستم</option>
    <option value="0">عادی</option>
</select>

safari vs other browsers

jsfiddle: http://jsfiddle.net/CHg8v/

Solutions in duplicated question does not cover my problem:

text-align: right on <select> or <option>

UPDATE:I am using safari 5.1 in windows.

text-align:-webkit-right does not works in safari 5.1 for windows

Upvotes: 6

Views: 8237

Answers (3)

N.P. SINGH
N.P. SINGH

Reputation: 303

Safari having the issue(bug) with the <Select>option for the text-align:right with the direction:rtl property. Please check following link for bug report:--

-->https://bugs.webkit.org/show_bug.cgi?format=multiple&id=19785

beside that I also find so many forums which reported this issue check some of then :--

-->http://csscreator.com/node/32981

-->http://css-tricks.com/forums/topic/aligning-select-box-options-to-the-right-in-safari/

-->http://hintsforums.macworld.com/showthread.php?t=107502

You can be do google for more information about this bug,

In the safari road maps(Implementations) I didn't hear any solution for this bug/issue.

Upvotes: 6

vishalkin
vishalkin

Reputation: 1235

try out this
text-align:-webkit-right

Upvotes: 0

Cowwando
Cowwando

Reputation: 460

use this: .classNameOfYourSelect input[type=option]{styling you want to add here}. By this way you edit only the Option elements with the specific css you will write inside the brackets, like color, background color and whatever you want.

Upvotes: 0

Related Questions