Reply to Re: Feeling Stupid....

Your name:

Reply:


Posted by Toby Inkster on 09/25/06 07:42

dorayme wrote:

> There is a left out unit in
>
> div#testSheets p{
> line-height:2;
> }

This is not an error. "line-height" is one of the few numeric values in
CSS that *does not require a unit*.

A unit *can* be specified, but when the unit is not specified, the
property takes a special meaning -- it initially means the same as if it
were specified in "ems" *except* that if any child elements have different
font sizes, the line height will scale up and down with the font size.

If you explicitly say "line-height: 2em" you get a different behaviour --
the line height remains constant, even when child elements have a larger
or smaller font.

Line heights without units are usually the most useful.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

[Back to original 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

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