|
Posted by Jukka K. Korpela on 05/30/07 13:29
Scripsit Bergamot:
> Andy Dingley wrote:
>>
>> body { font-size:1em; font-size:100%; }
>
> You don't really mean to suggest setting both, do you?
Andy's code sets font-size to 100% (of parent element's font size). The
first declaration is ignored, since here we have two settings for a property
of an element, all other things being equal except their order, so that the
latter wins.
Don't ask me why Andy included the declaration that will always be ignored.
> font-size:100% is a better choice because it prevents some bizarre
> scaling issues IE has with em units.
And even that setting isn't needed except for dealing with some browser
bugs. After all, by default the <body> element inherits the font size of
<html>, so there's little point in setting <body> font size to 100% of
<html> font size - except as a workaround to some bugs.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Navigation:
[Reply to this message]
|