Sunday 23rd of November 2014 04:03:00 AM

by Eric A. Meyer
ISBN 1-56592-622-6
First edition, published May 2000.
(See the catalog page for this book.)

Search the text of Cascading Style Sheets: The Definitive Guide.

Table of Contents

Copyright Page
Chapter 1: HTML and CSS
Chapter 2: Selectors and Structure
Chapter 3: Units and Values
Chapter 4: Text Properties
Chapter 5: Fonts
Chapter 6: Colors and Backgrounds
Chapter 7: Boxes and Borders
BODY {font-size: 10pt;}
DIV {line-height: 12pt;}
P {font-size: 18pt;}
<P>This paragraph's 'font-size' is 18pt, but the inherited 'line-height'
is only 12pt.  This may cause the lines of text to overlap each other by
a small amount.</P>
Figure 4-24

Figure 4-24. Small line height, large font size, slight problem

There are two solutions. One is to set the Chapter 8: Visual Formatting
Chapter 9: Positioning
Chapter 10: CSS2: A Look Ahead
Chapter 11: CSS in Action
Appendix A: CSS Resources
Appendix B: HTML 2.0 Style Sheet
Appendix C: CSS1 Properties
Appendix D: CSS Support Chart

Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

the appropriate distance from the bottom of theDIV. The fact that it overlaps the paragraphdoesn't matter, at least not technically.

Now let's consider an example where the margins of a list item,an unordered list, and a heading are all collapsed. In this case, theunordered list and heading will be set to have negative margins:

The larger of the two negative margins (-18px ) isadded to the largest positive margin (20px ),stricken will have only a line-through decoration.The underline and overline decorations are lost, since shorthandvalues replace one another, instead of accumulating. Weird decorations

Now, let's get into the many strange things abouttext-decoration. First off is the fact thattext-decoration is notinherited. This implies a requirement that any decoration lines drawn