I find it hard to understand why inline elements ignore line-height in some browsers (Chrome and Firefox ignore it, but IE9 does not).
Here is an example:
<small style="line-height: 1; font-size: 26px;">Hello, World</small>
Expected Result: The element's height should be 26px, but it is set to 31px. If I set the element lock, the height will be correctly set to 26 pixels.
Everything I read says that it should be set to the height of the line, so I canβt figure it out. Here is what I read on the W3C:
The height of each window of the built-in level in the line field is calculated. For replaced elements, inline block elements, and inline-table elements, this is the height of the field field; for inline boxes, this is their "line height" .
Source: http://www.w3.org/TR/CSS2/visudet.html#line-height
harryfino
source share