Friday 26th of August 2016 09:52:21 PM

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


padding-bottomIE4 P/P IE5 P/Y NN4 B/B Op3 Y/-

This property sets the size of thebottom padding of an element, and this padding will"inherit" the element's background. Negative valuesare not permitted.


UL {padding-bottom: 0.5in;}
padding-leftIE4 P/P IE5 P/Y NN4 B/B Op3 Y/-

This property sets the size of the leftpadding of an element, and this padding will "inherit" Chapter 5: Fonts
Chapter 6: Colors and Backgrounds
Chapter 7: Boxes and Borders
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 default value, auto, means that the clippingregion should have the same size and location as the element'scontent area. The other possibility is to define a clipping shapethat is relative to the element's content area. This does notalter the shape of the content area, but instead alters the area inwhich content may be rendered.


As we can see in Figure 7-41, despite the fact that the border's width was set to be 20px , when the style is set to none, not only does the border's style go away, so does its width! Why?

If you'll remember, the terminology used in the previous section was that a border with a style of none does not exist. Those words were picked carefully because they help explain what's going on here. Since the border doesn't exist, it can't have any width, so the width is automatically

To avoid this sort of thing, and to make sure that H2 elements do not coexist on a line with any floated elements, we use the value both. This value prevents coexistence with floated elements on both sides of the element, as shown in Figure 7-76:

H2 {clear: both;}
Figure 7-76

Figure 7-76. Clear on both sides

If, on the other hand, we're only worried about H2 elements flowing past floated elements to their right, then we'd use H2 {clear: right;}, with the result shown in
Figure 7-77.
Figure 7-77

Figure 7-77. Clear to the right