I have the following problem:
I have a span element with a string size of 18px and a font size of 16px. This works great when the text inside is not italic; the range remains 18 pixels.
A problem occurs when text within a range is shown in italics or bold. For some reason, the height of the span element adds one pixel, and I get a height of 19 pixels.
This issue only applies to firefox. IE, Safari, Opera and Chrome do not have this problem. The span remains 18-inch, no matter what.
Has anyone had this problem before?
This is the violation code:
span { font-size : 18px ; line-height : 18px ; } span.italicSpan { font-style : italic; }
There is an example here:
http://edincanada.co.cc/test/shjs-0.6/test7.html
Please check other browsers if you want. You will notice that the span elements are 18 pixels high, as they should be stored according to the line height: 18px
Edsfault
source share