Book Home Wednesday 01st of October 2014 05:59:44 AM Cascading Style Sheets: The Definitive GuideSearch this book

Full Text Search

H2 is a UL,which does not match the rule, and neither does the paragraph rightafter that. Finally, even though there is text directly after thethird H2, it isn't part of an element, sothe paragraph right after the text matches the rule and is coloredsilver. All this is demonstrated in Figure 10-5.

Figure 10-5

Figure 10-5. Selecting adjacent elements

If you wanted to make any element immediately following anH2 silver, then the universal selector comes into

If you are having difficulty searching, or if you have not used this search utility before, please read this.

Library Navigation Links

Copyright © 2002 O'Reilly & Associates, Inc. All Rights Reserved.

each level, and the keywords normal and bold are assigned to the numbers 400 and 700, respectively.

In our second example, we consider the font family Zurich, which was discussed near the beginning of this section. Hypothetically, its variants might be assigned values for font-weight as shown in Table 5-3.

Table 5-1. Hypothetical Weight Assignments for a Specific Font

"Kats," so we set the following:

H1 {font: 300% Helvetica,sans-serif; font-variant: small-caps;
letter-spacing: 0.75em; text-align: right; padding-right: 1em;
line-height: 1em;}
H1:first-letter {font-size: 200%; line-height: 1px; vertical-align: -100%;}

Consulting Figure 11-16, we see that it looks about right!

Figure 6-17

Figure 6-17. Navigator's incorrect behavior

Let me reiterate: this is totally wrong.However, there is a way around it, which is to set a border on theelement. You can do this by setting the border the same color as thebackground color of your document:

BODY {background: silver;}P {background-color: gray; padding: 1px; border: 0.1px solid gray;}

It is necessary to set a border-style for this(700). From 700, there is noheavier face, so the user agent simply moves the value offont-weight one notch up the numeric scale(800). Furthermore, if we were to insert aSTRONG element into the Belement, it would come out like Figure 5-14:

<P>100 <SPAN> 400 <STRONG> 700 <B> 800 <STRONG> 900</STRONG></B></STRONG></SPAN>.