Saturday 22nd of November 2014 05:12:35 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

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

H1 {color: gray;}   /* This CSS comment is several lines */
H2 {color: silver;} /* long, but since it is alongside */
P {color: white;}   /* actual styles, each line needs to */
PRE {color: gray;} /* be wrapped in comment markers. */

Given this example, if each line isn't marked off, then most of the style sheet will become part of the comment, and so will not work:

H1 {color: gray;}   /* This CSS comment is several lines
alt="Library Navigation Links"

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

columns. Remember, we don't wantto use tables or proprietary tags such asMULTICOL, so we'll have to resort tosomething else. In this case, since each column has a number ofparagraphs, we can use a DIV tag -- or, to bemore precise, two of them. All we need to do is split the articletext roughly in half, and wrap a DIV around eachhalf. (By article text, we mean the actual text of the article,excluding the title.) Let's use the place where the column endson the printed page as our guide to end the first division and startin a block-level tag such as a paragraph <P ALIGN="left">, headline, e.g., <H2 ALIGN="center"> or page division <DIV ALIGN="right">.  Each of these should terminate with a corresponding termination tag </P>, </H2> or </DIV> as appropriate. 

The block-level <CENTER> tag is still a commonly-used alternative (includes its own line breaks).  Use <BLOCKQUOTE> for both-margin indents, <UL> with no list items for left-indents (see below). Alternate style sheets

Unfortunately, as of this writing, browsers don't make it very easy to select alternate style sheets, assuming that they can do so at all. Should a browser be able to use alternate style sheets, it will use the values of the TITLE attributes to generate a list of style alternatives. So you could write the following:

<LINK REL="stylesheet" TYPE="text/css"
HREF="sheet1.css" TITLE="Default">
do include the correct TYPEof text/css in the LINKelement. So make sure you name your style sheets appropriately.