Monday 28th of July 2014 02:19:33 PM whitespace to be treated as it is in the HTML element PRE, with whitespace and returns preserved. nowrap prevents an element from line breaking.

Example

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 can be used on any block-level or replaced element. Negative values

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

There are no index entries for this letter.


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.

safe, but trying to push an element upward on the page is generally abad idea.

There is one other case where a floated element can run outside ofits parent element, and that's when the floated element iswider than its parent. In that case, the floated element will simplyoverrun either the right or left inner edge in its best attempt todisplay itself correctly, depending on which way it was floated. Insuch a case, you get the result shown in Figure 7-72.

background-color

<color> | transparent

The background is the area of the content box and the padding and is always behind the foreground of the element. Therefore, the declared background color is applied to both the element's content box and its padding, as illustrated in Figure 6-14:

P {background-color: gray;}
The ends of the element are another story, as we saw in Chapter 7, "Boxes and Borders". Once again, this is because an inline element that is displayed on multiple lines is just the same as a single-line element that has been broken into pieces. Consult Figure 8-60 for a more detailed look at this situation caused by using these styles:

SPAN {border: 1px dashed black; padding: 4pt; margin: 8pt;}
Figure 8-60

Figure 8-60. Inline margins and line-box layout