You are here: Re: Cell spacing in a stylesheet « HTML « IT news, forums, messages
Re: Cell spacing in a stylesheet

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

 

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

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