|Ned Batchelder : Blog | Code | Text | Site|
IE difficulties: font size rounding
» Home : Blog : November 2003
More web design minutia: The second difficulty (see previous blog entry) I was having with IE had to do with font sizing, but I finally solved it.
When I adjusted the font sizes in nested elements, the results would be different for IE and Firebird. I thought it had to do with CSS bugs dealing with nested contexts, but none of the CSS references mentioned it.
Poking around the we're-not-worthy css-discuss wiki, I stumbled upon the answer on the UsingEms page. The browser difference is in the rounding of font sizes, and which result of rounding is used for further computations in nested contexts. It turns out you can trick the browsers into identical algorithms with this rule:
Now the text on this page is the same size in IE as it has been for months in Mozilla. At last!