Skip to Main Content
Cascading Style Sheets: The Definitive Guide, Second Edition
book

Cascading Style Sheets: The Definitive Guide, Second Edition

by Eric A. Meyer
March 2004
Intermediate to advanced content levelIntermediate to advanced
528 pages
16h 33m
English
O'Reilly Media, Inc.
Content preview from Cascading Style Sheets: The Definitive Guide, Second Edition

Summary

Even without trying to alter the font in use, there are many ways to change the appearance of text. There are classic effects such as underlining, of course, but CSS also gives you the ability to draw lines over text or through it, change the amount of space between words and letters, indent the first line of a paragraph (or other block-level element), align text to the left or right, and much more. You can even alter the amount of space between lines of text, although this operation is unexpectedly complicated and covered in detail in Chapter 7.

These behaviors are all relatively well supported or else not supported at all. Full justification of text is one of the big ones that is not well supported, and most user agents released during the 20th century exhibited bugs in the text decoration and vertical alignment, as well as line height calculations. On the other hand, word and letter spacing almost always work correctly when they’re supported, and text indentation has experienced only a few very small bugs. The same is true of the ability to alter capitalization, which is usually supported correctly.

At a few points in this chapter, I mentioned that the layout of lines was a more complicated process than presented. The details of that process, and a great deal more, are covered in the next chapter.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Cascading Style Sheets: The Definitive Guide

Cascading Style Sheets: The Definitive Guide

Eric A. Meyer

Publisher Resources

ISBN: 0596005253Catalog PageErrata