On 2007/09/21 09:22 (GMT-0400) Rowan @ Jetboy apparently typed:
> I'm looking to use em or ex units for elastic layout on a new site.
> mozillaZine (http://kb.mozillazine.org/Em_vs._ex) recommends ex's to avoid
> rounding errors (in Moz), but other sites make veiled references to ex
> problems with older browsers.
> Can anyone tell me what those problems are/were, and on which browsers?
> Does anyone have any strong reasons to suggest using one unit over the
The premise of that article that 1ex=6px and 1em=10.06667 is bogus. 1em=the
size of the base font (from the spec: the 'em' unit is equal to the computed
value of the 'font-size' property of the element on which it is used), by
default most often 12pt (which is 16px on nominally 96 DPI systems), or 16px
directly. However, people can and do change their defaults. Mine is 20px.
OTOH, 1ex is supposed to be the actual x-height, which varies among the
various font families. http://dbaron.org/css/fonts/aspect_resultshttp://www.barrypearson.co.uk/articles/text/aspect_values.htm
Good browsers, such as Gecko, use the font's actual x-height, while bad
browsers, such as IE6, ignore the actual x-height and use 1em/2. As a
consequence, if you want maximum consistency across browserland, em should be
much preferred over ex. http://www.xs4all.nl/~sbpoley/webmatters/emex.html
"It yet remains a problem to be solved in human affairs,
whether any free government can be permanent, where the
public worship of God, and the support of religion,
constitute no part of the policy or duty of the state in
any assignable shape."
Chief Justice Joseph Story
Team OS/2 ** Reg. Linux User #211409
Felix Miata *** http://mrmazda.no-ip.com/
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/