Re: Dreams, and ems, oh my!
by "Donna M Smillie" <dms(at)zetnet.co.uk>
|
Date: |
Wed, 22 Mar 2000 07:44:57 -0000 |
To: |
"Katherine Carrington" <katherinecarrington(at)mac.com>, "HTML Techniques" <hwg-techniques(at)hwg.org> |
References: |
mac |
|
todo: View
Thread,
Original
|
|
----- Original Message -----
From: Katherine Carrington <katherinecarrington(at)mac.com>
> Noting that one of suggestions that is given by
<http://cast.org/bobby/> is
> the use of ems, rather than pts, I've decided to make the big
leap and take
> them up on thier suggestion. What I can't figure out, and
can't seem to
> find anywhere, is does one begin with a base number?
>
> For instance, I am working on an external style sheet, if I
wanted to have
> the majority of font size on my page to be 12pts, and use ems
for
> (larger/smaller), where do I put the 12pts? In the body? and
then use the
> ems for (larger/smaller)?
>
> Specs, page 44:
>
> "The 'em' unit is equal to the computed value of the
'font-size' property of
> the element on which it is used."
>
> This *seems* to answer my question, but I've spent the night
flapping in the
> wind, and I'm wondering if someone would correct my thinking?!
Hi Katherine
If I understand "em"s correctly, the reason Bobby advises using
them as the unit of measurement is in order to work with the
*user's* preferred font size. That becomes the "computed value"
of the 'font-size' property, and, if you use 'em' as the scale of
measurement in your style sheet, everything else then takes its
scale from the user's selected font size. Defining a base font
size in points or pixels would defeat that purpose.
On that basis, you would leave the default font size undefined,
and only define the size (in ems) of elements where you want a
larger or smaller font, and of other, non-font elements (eg
boxes, rules, etc).
Regards,
Donna
--
dms(at)zetnet.co.uk
Different Worlds: http://www.users.zetnet.co.uk/dms/
Pictures of the Past, The Leslie Smith Family,
An Introduction to HTML, Copyright Considerations
Online Bookshop
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA