|
Posted by Jukka K. Korpela on 09/04/05 10:08
Leonard Blaisdell <leo@greatbasin.com> wrote:
> In article <0LrSe.360$wR4.27353@monger.newsread.com>,
> "Jonathan N. Little" <lws4art@centralva.net> wrote:
- -
>> an 'em' is the width of the font's letter M so 15em would be the 15 x
>> width of the font's M, in other words, *really big*. Try decimal values
>> for subtler results, 1.5em
>
> An em is related to the font chosen by the user for their browser. 1em
> is the equivalent to what the user expects to be his browser's default
> font size. 1.5em is one and a half times as large as the browser's
> default font size. .8em is eight-tenths as large. Even though it's
> available, don't use px.
> I'm simply expounding on what Mr. Little said and not disagreeing at all.
Sorry, what Mr. Little said was wrong. Your explanation was better, but it
did not correct the basic mistake, and was a bit misleading too. The em
unit means the size of the font, which is by definition the height of the
font, which is _not_ equal to the width or height of any particular letter
except by coincidence. Roughly speaking, the height of a font is the
vertical distance from the highest ascender's highest point down to the
lowest descender's lowest point.
The em unit means the size of the font of the element itself, except in a
font-size property, where it means the size of the font of the enclosing
element. How it related to the browser's default font depends on the style
sheet(s) involved, as a whole, as well as on user actions. If you set, for
example, * { font-size: 9px; } in your style sheet (a grossly wrong
decision of course, but that's a different issue), then em means 9px,
unless your style sheet is overridden by a user style sheet.
--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
[Back to original message]
|