You are here: Re: Pixel to Em conversion... « HTML « IT news, forums, messages
Re: Pixel to Em conversion...

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация