Friday 19th of January 2018 12:53:40 AM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Symbols | A | B | C | D | E | F loated elements as well. For example, youcan allow a floated element's width to be relative to the widthof its parent element (which is its containing block), while alsomaking sure that the float's width never goes below10em. The reverse approach is also possible:

This will set the float to be 40em wide, unlessthat would be more than 40% the width of the containing block, inwhich case the float will be narrowed.

| G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

Index: Z

z-axis: 9.5. Stacking Positioned Elements
z-index property: 9.5. Stacking Positioned Elements


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.

proportionally spacious</SMALL>, which is what the author probably wanted.</P>
Figure 4-53

Figure 4-53. Overcoming inherited letterspacing.

The default value none will simply leave the text alone and use whatever capitalization exists in the source document. uppercase and lowercase cause the text to be converted into all upper- or lowercase characters, as their names would indicate. Finally,

P {margin: 5px; background-color: silver; border-style: solid;}
Figure 7-37

Figure 7-37. Margins, backgrounds, and borders

The border's width is, by default, medium , as we can see in Figure 7-37. We can change that to the result in Figure 7-38 as follows:

As we can see in Figure 7-41, despite the fact that the border's width was set to be 20px , when the style is set to none, not only does the

Figure 8-7

Figure 8-7. Element boxes are as wide as the width of their parent element

Thus, if the width of the DIVis 30em , then the sum total of the content width,padding, borders, and margins of each paragraph will be30em. In Figure 8-7, the"blank" space around the paragraphs is actually theirmargins. (If the DIV had any padding, there wouldbe even more blank space, but that wasn't the case here.)

Figure 5-25

Figure 5-25. Ordinary document behavior through CSS

On the other hand, you might decide that there should be a subtledifference between EM and I:

P {font-style: normal;}EM {font-style: oblique;}I {font-style: italic;}

If you look closely at Figure 5-26, you'll seethere is no apparent difference between the EM andI elements. In practice, not every font is so