Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Revisiting the Firefox button line-height bug... any 2011 solutions?

Tags:

css

The Firefox line-height bug is a pain. In short, it prevents the manual setting of line-height on button elements through a browser style line-height: normal !important declaration that can't be reversed.

Now this is a huge pain, and in an era where hacking around browser-specific quirks is fortunately becoming decreasingly necessary, I'd hate to have to make an exception for Firefox of all browsers.

So my question now is whether there's anything I can do about it since the concession that the above article made that it was basically impossible.

Here's a fiddle to play around with: http://jsfiddle.net/hBLQ7/

Open in Firefox and Chrome and observe the difference.

So is there anything we can do in this day and age?

like image 897
Steven Avatar asked May 03 '11 00:05

Steven


2 Answers

Can you just set the height of the button, if that's what you're after?

like image 117
Boris Zbarsky Avatar answered Nov 15 '22 10:11

Boris Zbarsky


What about hacking it with top and bottom padding ?

CSS

button {
   padding: 25px 0;
}

Example

Example

jsFiddle.

like image 44
alex Avatar answered Nov 15 '22 10:11

alex