Friday 18th of April 2014 03:06:07 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 layout, but we're going to modify it slightly. Instead of four cells, it will only have two: the sidebar and the rest of the screen. The navigation bar will become part of the main display, and the blank "spacing" table cell will be eliminated entirely. This will leave us with the following:

<TD>navigation bar and main display</TD>

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.

Even better, you can string more than one child selector together toprecisely target a given type of element. Take this, for example:

Figure 10-4

Figure 10-4. Selecting grandchildren only

The first list item in the source is silver because it's thechild of an ordered list that is itself the child of aBODY. The second list item in the source is thechild of an unordered list, so it can't match the rule.Finally, the third list item in the source is a child of an orderedof colors, then the easiest method is to simply use the name of thecolor you want. These are referred to, unsurprisingly enough, asnamedcolors.

Contrary to what some browser companies might have you believe, youare limited in the range of named colors available. For example,setting a color to "mother-of-pearl" isn't going towork, because it isn't a defined color. (Well, not yet, at any</P>

Figure 5-12

Figure 5-12. Moving up the weight scale

In the last two nested elements, the computed value offont-weight is increased because of the liberaluse of the keyword bolder. If we were to replacethe text in the paragraph with numbers representing thefont-weight of each element, we would get theresults in Figure 5-13:

H3 {font-size: 36pt;}


xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | <length> | <percentage>

oblique, or normal text. Italic text is generally a defined font face within the font itself, whereas oblique text is less often so. In the latter case, the user agent can compute a slanted font face.


EM {font-style: oblique;}

Let's revisit that example for a moment:

H1 {margin: 0.5em 10% 0.5em 10%;}

Seems a little redundant, doesn't it? After all, you have totype in the same pair of values twice. Fortunately, CSS offers aneasy way to avoid this.

7.3.3. Replicating Values