text-align is not working on safari <select>

syrkull picture syrkull · Jun 25, 2012 · Viewed 32.2k times · Source

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.

Answer

Anirudh Ramanathan picture Anirudh Ramanathan · Jun 25, 2012

For Safari

text-align: -webkit-center;

However, the best way to analyze the working of HTML/CSS is the Web-Inspector in Safari.

enter image description here More >>