Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

html

css

safari

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

like image 382
Mohsen Kashi Avatar asked Sep 25 '13 12:09

Mohsen Kashi


People also ask

How do I center text in a selection?

Right-click the text box for which you want to set vertical alignment. On the shortcut menu, click Format Text Box. In the Format Text Box dialog box, click the Text Box tab. In the Vertical alignment box, select Top, Middle, or Bottom.

How do I center align text in Dropdownlist?

Dropdown button can be positioned in the center of the page by setting the “text-align” property of dropdown div to center. The following example contains a simple Bootstrap dropdown menu with an added class “my-menu”. The property “text-align: center” is added to the class.

What is the use of align right option?

For left to right text, the default is align=left , while for right to left text, the default is align=right .


1 Answers

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.

like image 99
N.P. SINGH Avatar answered Nov 09 '22 13:11

N.P. SINGH