You are here: Re: How to Change Line-Spacing ? « HTML « IT news, forums, messages
Re: How to Change Line-Spacing ?

Posted by Jukka K. Korpela on 03/28/07 13:09

Scripsit Talal Itani:

> Some web sites have text line-spacing different from the default. Maybe
> one and a half lines. How do they do that? Thanks.

They might do it some wrong way, but the simple way is

* { line-height: 1.5; }

in CSS. It's a good idea, because setting line-height magically protects
against some nasty browser bugs (Peekaboo bugs), in addition to fixing the
common problem that default line-height is too small for most fonts that
authors use on web pages, when lines can be fairly long.

The value of 1.5 is fairly large, though; usually 1.3 or 1.35 is sufficient.
It may _look_ like "one and a half lines", since e.g. 1.3 means 1.3 times
the font size, and the font size is normally larger than what people may see
as the height of the letters, since it means (roughly speaking) the distance
from the bottom of the lowest descender up to the top of the highest
ascender plus often a little extra spacing.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

 

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

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