Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

CSS: Fonts and Text : Page 5

Learn all kinds of things about altering fonts and text.


advertisement
Line Height: {line-height: normal/XXunits/%}
The line-height specifies the space from the baseline of one line of text to the baseline of the next.

If you are familiar with typesetting, you've called this measurement leading. If you worked with desktop publishing, you may have called it line space.

You can specify line height in either absolute (most likely points) or relative (mostly likely percentage) values. The line height you use will depend on the font style and size. Some fonts look better with more "breathing space" while others work best set more solidly. Good starting points to try are 12 point text with 14 point line height or 120% line height.



Example:

P {font-size: 10pt; line-height: 12pt}

If you are using a CSS-enabled browser, this paragraph is 10 point text with a line-height value of 12 points. Or, as we used to say in typesetting-speak, it is 10/12... "10 on 12."

P {font-size: 14pt; line-height: 28pt}

If you are using a CSS-enabled browser, this paragraph is 14 point text with a line-height value of 28 points. It should look "double-spaced."

P {line-height: 120%}

If you are using a CSS-enabled browser, this paragraph has a 120% line-height value. The actual amount of space from baseline to baseline will change with the size of the text.



Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date