Monday 22nd of December 2014 02:16:44 AM

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

x-height: 3.2.2.1. 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.

margins.

In the case where there are only two margins to be collapsed, onepositive and the other negative, the situation is handled in a fairlysimple manner. The absolute value of the negative margin issubtracted from the positive margin -- or, to put it another way,the negative is added to the positive -- and the resulting valueis the distance between the elements. Figure 8-21provides two concrete examples.

in Figure 1-2.

And what is the format of an external style sheet? It's simplya list of rules, just like those we saw in the previous section andin the example above, but in this case, the rules are saved intotheir own file. Just remember that no HTML or any other markuplanguage can be included in the style sheet -- only style rules.Here's the markup of an external style sheet:

H1 {color: red;}
makes apparent.

B {padding-left: 10px; padding-right: 10px; background: silver;}
Figure 7-60

Figure 7-60. Padding on an inline element

Note the extra background space that appears on either end of the boldfaced text. There's your padding.

This all seems familiar enough, even when the boldfaced text stretches across multiple lines. Turn to Figure 7-61 to see what happens with padding set on an inline element displayed