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

Posted by Andy Dingley on 05/30/07 09:57

On 30 May, 03:49, Maxx Pollare <useless...@dragonfur.ca> wrote:

> "What the hell is an Em, and how big is it in pixels?".

There's no such relationship, and to even think that there is is a
major error in CSS design. Read the groups' archives, as this gets
discussed to death.

To convert from pixels to ems, then converting 12pixels to 1em won't
go far wrong.

1em is 100%, so you can use percentages if you prefer.

Then after you've done that, normalise all em settings so that nothing
is less than than 0.75em. Possibly unreadable legal boilerplate might
go to 0.67em, but that's hard to read and anything less is impossible.

Then go through and delete (nearly) all the em settings anyway. It's
just not necessary in competent web design to set this explicitly
(thinking it's appropriate to do is again a major error, as it betrays
that you don't realise how little the author controls and how much the
reader controls).

If you set
body { font-size:1em; font-size:100%; }
then that's enough for nearly all web pages. <h*> will be bigger, but
the default style sheet will probably take care of that adequately
anyway. Semantic HTML markup (marking up your "headings" with <h*>
elements) will take care of most needs to set bigger sizes.

It's extremely rare to need to set a font-size > 2em, for anything.
Thinking this is a good idea is usually an indication of simple poor,
garish "eBay style" design.

If you still think you need to set em sizes all over the place, then
post again with example pages for where and why you think it's needed.

 

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

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