|
Posted by David Dorward on 05/30/07 07:04
On May 30, 3:49 am, Maxx Pollare <useless...@dragonfur.ca> wrote:
> I'm in the process of creating some new CSS for my site (same as email)
> and wanted to try something other then pixles for everything...
>
> Unfortunately I couldn't get Google to give me a simple page that gives
> me a relationship between Em and Pixels, as in "What the hell is an Em,
> and how big is it in pixels?". So far I've scraped the experimental CSS
> layouts twice because I can't things to work right with Em...
An em is the font height (or the font height of the parent element
when you are specifying the font-size).
Since this eventually means you are describing something as a ratio of
the font size of the parent element of html, this means that you are
describing things as a ratio of whatever font size the user as
selected as their preference.
Since you don't know what the user's preference is, you can't convert
from pixels to ems or the other way. If you could, then there would be
no point in using ems instead of pixels.
Just keep your body text (i.e. the main text) at 100% (trusting that
the user has their preference set to something comfortable to read
(and the browser defaults before changing are good for most people -
vendors have done a fair bit of usability testing) and adjust up and
down for headings, small print and similar.
--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/
[Back to original message]
|