Friday 20th of April 2018 04:44:46 PM

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 | P | Q | R | S | T | U | V | W | X | Y | Z class and ID selectors, there isn't much reason to do so. The following two rules mean exactly the same thing:

*.apple {color: red;}
.apple {color: red;}

However, you should consider this: if you're concerned about older user agents that don't know about CSS2, then *.class (or *#id) is an easy way to fool them. Since both of these are examples of invalid selectors in CSS1, they should be ignored by CSS1-only parsers. If

Index: N

named colors: 3.1.1. Named Colors
navigation bar: 11.1.2. Case 2: Library Catalog System Interface
negative margins: 7.3.6. Negative Margin Values
block-level elements: Negative margins
caution with: 7.3.6. Negative Margin Values
browser support for: 7.3.6. Negative Margin Values
floated elements and: Negative margins and floating Negative margins
11.1.3. Case 3: Putting a Magazine Article Online
inline replaced elements and: Adding box properties
negative values in percentage colors: Percentage colors
nesting, shrinking text and: 11.2.6. The Incredible Shrinking Text!
Netscape Navigator
blinking support: 4.1.6. Text Decoration
CSS implementations in: 1.3.2. Implementations
disappearing styles: 11.2.10. Disappearing Styles
margin problems and: 11.2.3. Fighting Margin Problems with @import
preferences for style sheets/JavaScript: 11.2.1. Making Styles Work
Netscape Navigator 4.x
background color: 7.4.6. Borders: Known Issues
background color, incorrect placement: Real-world issues
correcting: 11.2.5. Getting Full Content Backgrounds in Navigator
block-level elements, borders and: 7.4.6. Borders: Known Issues
bold text, preserving: 11.2.7. Preserving Boldness
inline elements
borders and: 7.4.5. Borders and Inline Elements
caution with: 7.4.6. Borders: Known Issues
margins and: 7.3.8. Margins: Known Issues
padding and: 7.5.4. Padding: Known Issues
relative URLs and: 3.4. URLs
styles, hiding: 11.2.2. Hiding Styles with @import
nonreplaced elements: 8.4. Inline Elements
number keywords: 5.2.1. How Weights Work
numbering, automatic: 10.4.1. Automatic Numbering
numeric RGB equivalents, list of: Going by numbers

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.

inline element) is floated, it becomes a block-level element. Thisblock-level status helps explain why when an element is floated,other content flows around it.

Remember that if you float atextelement, its width will tend toward zero. This is exactly theopposite of the normal horizontal rules, wherewidth is increased until the seven propertiesequal the parent's width. A floated