Friday 09th of October 2015 05:08:48 AM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O doesn't. The absence of a border style also resets the width,but we'll get to that in a little while.

Finally, the default border color is the foreground color of theelement itself. If no color has been declared for the border, then itwill be the same color as the text of the element. If, on the otherhand, an element has no text -- let's say a table whichcontains only images -- then thanks to the fact that color isinherited, the border color for that table would be the text color ofits parent element. This is likely to be BODY, | P | Q | R | S | T | U | V | W | X | Y | Z

Index: O

oblique text: 5.4.1. Fonts with Style
octothorpe (#) preceding ID selectors: 2.3.2. ID Selectors
offsets (see side-offset properties)
CSS implementation in: 1.3.2. Implementations
padding and: 7.5.4. Padding: Known Issues
padding values, negative: 7.5. Padding
operating system, colors and: 10.5.2. Colors
order sorting: 2.8. The Cascade
ordered lists: 7.7.1. Types of Lists
7.7.2. List Item Images
origin image: Length values
origin sorting: 2.8. The Cascade
origins: 2.8. The Cascade
orphans property: 10.8.1. Paged Media
outline properties: 10.5.3. Outlines
overflow: 9.1.4. Content Overflow and Clipping
overflow-clip property: Overflow clipping
overflow clipping: Overflow clipping
overflow property: Overflow
elements, altering: 9.5. Stacking Positioned Elements
floated elements, preventing: 8.3.1. Floating: The Details
margins (see collapsing margins)
text, preventing: 8.4.3. Managing the Line Height of Inline Elements
overlining: 4.1.6. Text Decoration
overriding previously declared values: 11.1.3. Case 3: Putting a Magazine Article Online

Symbols | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

P.wide {margin-left: 10px; width: auto; margin-right: -50px; border: 1px solid gray;}
Figure 8-19

Figure 8-19. Wider children through negative margins

Yes, the child element is wider than its parent! This is mathematically correct: 10 + + + 450 + + - 50 = 400. Even though this leads to a child element sticking out of its parent, technically the specification

Figure 9-23

Figure 9-23. Nested absolutely positioned elements

The small box B in the lower-left corner of the element A is a child of A, which is in turn a child of a relatively positioned DIV. B was absolutely positioned, as was element A, using styles like these:

DIV {position: relative;}
P.A {position: absolute; top: 0; right: 0; width: 15em; height: auto;
margin-left: auto;}
P.B {position: absolute; bottom: 0; left: 0; width: 10em; height: 50%;See Chapter 10, "CSS2: A Look Ahead", for more details.


.hide {display: none;}


block | inline | list-item | none



However, you should consider this: if you're concerned aboutolder user agents that don't know about CSS2, then*.class (or *#id) is an easyway to fool them. Since both of these are examples of invalidselectors in CSS1, they should be ignored by CSS1-only parsers. Ifthey aren't ignored, then they're likely to cause strangeresults. Therefore, it might be a good idea to omit the universalselector in conjunction with class and ID selectors.