TD.highlight {color: yellow;}

This sets the foreground color of all elements within any table cell with a class of highlight to be yellow, as shown in Figure 6-2:

Figure 6-2

Figure 6-2. Highlighting a table cell contents

6.1.1.1. BODY attributes

There are many uses for Tuesday 25th of April 2017 10:19:44 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
Preface
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
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
Index
Colophon
Library Navigation Links

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

window itself!

TIP

Remember that padding, borders, and content widths can never benegative. Only margins can be less than zero.

Negative margins have an impact on vertical formatting as well,affecting how margins are collapsed. If there are negative verticalmargins, then the browser should take the absolute maximum of the

P {margin: 10%;}
<DIV STYLE="width: 200px;">
<P>This paragraph is contained within a DIV which has a width of 200 pixels,
so its margin will be 10% of the width of the paragraph's parent (the DIV).
Given the declared width of 200 pixels, the margin will be 20 pixels on
all sides.</P>
</DIV>
<DIV STYLE="width: 100px;">
<P>This paragraph is contained within a DIV with a width of 100 pixels,be possible to perform percentage-value vertical alignments. Theheight of the image itself has no relevance when it comes to verticalalignment: the value of line-height is all thatmatters.