Thursday 23rd of March 2017 09:02:34 PM CLASS="dkblue">...</H2>.


It's actually better to pick classnames that are descriptive of the type of information containedwithin, not of the visual effect you're trying to achieve atthe moment. For example, let's say that we want the dark bluecolor to be applied to all H2 elements that aresubsection headings. It would be much better to pick a class namelike subsec or even

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

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.

Figure 8-37

Figure 8-37. Given the other constraints, go as high as possible


Unfortunately, since there is no precise definition meaning for "as high as possible" (which could be, and in fact has been, argued to mean "as high as conveniently possible"), you cannot rely on consistent behavior even among browsers that are considered CSS1-compliant. Most browsers will follow historical practice and float the image down into the next line, but a few -- Opera 3.6, for one -- will float the image into the current line if it has room to do so.

normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900





Applies to

all elements

image for each bullet. In the past, the only way to achieve this sort of effect was to fake it. Now all you need is a list-style-image declaration.


Yes, that's really all there is to it. One simple url value, and you're putting images in for bullets, as you can see in Figure 7-81.

less than that needed to display the content:

<P STYLE="height: 3em;">

then the browser is supposed to provide a way to see all contentwithout increasing the height. This could possibly mean adding ascrollbar to the element, as shown in Figure 8-4.

Figure 8-4

Figure 8-4. One way to handle a short height on a tall element

In practice, most browsers will not do this. They will instead simplyincrease the height of the element, as though the value ofmatching those original 16. They may be a fairly motley collection ofcolors, but they're what we have.

So let's say we want all first-level headings to be maroon. Thebest declaration would be:

H1 {color: maroon;}

Simple, straightforward, and difficult to forget. It doesn'tget much better than that. Here are a few more examples: