Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox select element doubles text-indent value

Tags:

css

firefox

I discovered a strange issue today which seems to be a bug in Firefox 35.0. When specifying a text-indent property for a select element, Firefox seems to double the pixel value. Other browsers are correctly displaying the indent.

Is there a workaround to avoid this? I'm forced to use text-indent rather than padding to work around various other browser inconsistencies (specifically webkit on a Mac). I need to use text-indent but I'm unable to stop the value from doubling in Firefox.

Here's an example showing the issue: http://jsfiddle.net/k92dvxte/1/

Thanks for the help.

like image 878
AJReading Avatar asked Jan 23 '15 11:01

AJReading


1 Answers

Explaining what @sydonia said:

You'll just have to put this code after the select rule in your CSS:

@-moz-document url-prefix() {
    select {
       text-indent: 50px;
    }
}
like image 134
Sandro Eric Avatar answered Oct 05 '22 16:10

Sandro Eric