<U>). Since the entirety of the sidebar uses the font Verdana, we can add that to our style sheet:

.sidebar {background: green; font-family: Verdana,sans-serif;}

We use font-family here because we don't want to specify a font-size for the sidebar, so we can't use the shorthand font.

Now we could put headings and lists of links in separate paragraphs and then mess around with the padding, margin, Friday 24th of May 2013 10:16:19 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 | 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)
Opera
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: 6.2.3.3. 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: 9.1.4.2. Overflow clipping
overflow clipping: 9.1.4.2. Overflow clipping
overflow property: 9.1.4.1. Overflow
overlapping
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.

wouldn't make any sense. There can only be one of each type of value: that is, only one width value, only one color value, and only one border style. So don't try to declare more than one value type:

H3 {border: thin thick solid purple;}  /* two width values--WRONG */

In such a case, the entire statement will be invalid and should be ignored altogether.

Finally, you need to take the usual precautions with shorthand

  • When an element's box is taller than the height explicitly setfor its parent.

  • When an element has been absolutely positioned.

  • The default value of visible means that thecontent may be visible outside the element's box. Typically,this would lead to the content simply running outside its own element