Saturday 29th of November 2014 03:08:06 AM

Book Home

across multiple lines, the situation becomes a little odd. First,realize that the margins set for inline elements are not applied atthe point where line-breaking occurs. This line-breaking happens inthe course of wrapping text so that it fits inside thebrowser's window, for example, or inside a parent element. Theonly effect margins have on line-breaking is that, by causing extraspace to appear within the line, they can move content over. This maycause a line to break at a different spot than it ordinarily wouldhave.

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: X

x-height: em and ex units
XML (Extensible Markup Language): 1.2.6. Preparing for the Future
display property and: 2.9.1. Why Does the display Property Exist?
selectors in: 2.1.2. Simple Selectors

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 7-82

Figure 7-82. Using really big images as bullets

You should usually provide a fallback for the bullet type. Do this just in case your image doesn't load, or gets corrupted, or is in a format that some user agents might not be able to display (as is the case in Figure 7-83). Therefore, you should always define a backup list-style-type for the list:

UL LI {list-style-image: url(ohio.bmp); list-style-type: square;}
Figure 7-83

Figure 7-83. Providing fallbacks for unusable images

repeat pattern. For the H1, however, the only place we can see its background is in the padding and content of the H1 itself. Since both background images are the same size, and they have precisely the same origin position, they appear to "line up" as shown in
Figure 6-57.


There's a downside: as of this writing, web browsers don't get this fixed alignment right, so this example was just an interesting theoretical exercise. whitespace to a single space. pre causes whitespace to be treated as it is in the HTML element PRE, with whitespace and returns preserved. nowrap prevents an element from line breaking.


TD {white-space: nowrap;}
TT {white-space: pre;}
widthIE4 P/Y IE5 P/Y NN4 P/P Op3 Q/-

Used to set the width of an element. This is most often applied to images, but