Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

text-align is not working on safari <select>

Tags:

I have tried aligning the text in the <select> element to the right or the center in safari. But nothing worked. text-align:center; worked in all browsers except safari. direction:rtl; and dir="rtl" did not do anything. the list is always align to the left in Safari. -webkit-appearance: none; does not help either. Please I need a solution.

like image 979
syrkull Avatar asked Jun 25 '12 01:06

syrkull


People also ask

Why text-Align Center doesn't work?

This is because text-align:center only affects inline elements, and <aside> is not an inline element by default. It is a block-level element. To align it, we will have to use something other than text-align , or turn it into an inline element.

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.

How do I align selected text to the right?

Align a Paragraph To align left, press Ctrl + L. To align right, press Ctrl + R. To align center, press Ctrl + C. To justify, Ctrl + J.


1 Answers

Is a bug in safari.

Bug 40216 - text-align doesn't work on select tags
https://bugs.webkit.org/show_bug.cgi?id=40216

Filed 2010 😢

like image 154
Doug Avatar answered Sep 20 '22 16:09

Doug