Book HomeCascading Style Sheets: The Definitive GuideSearch this book Wednesday 28th of June 2017 07:18:58 AM

0.3. How to Contact Us

We have tested and verified the information in this book to the best of our ability, but you may find that features have changed (or even that we have made mistakes!). Please let us know about any errors you find, as well as your suggestions for future editions, by writing to:

O'Reilly & Associates, Inc.

1005 Gravenstein Highway North

Sebastopol, CA 95472

(800) 998-9938 (in the U.S. or Canada)

(707) 829-0515 (international/local)

(707) 829-0104 (fax)

element still affects the document's layout as though it werevisible. In other words, the element is still there: you justcan't see it. Note the difference between this anddisplay: none. In the lattercase, the element is not displayed and is removed from the documentaltogether so that it doesn't have any effect on documentlayout. Figure 9-14 shows a document in which anEM element has been set to behidden, based on the following styles and markup:

You can also send us messages electronically. To be put on the mailing list or request a catalog, send email to:

To ask technical questions or comment on the book, send email to:

We have a web site for the book, where we'll list examples, errata, and any plans for future editions. You can access this page at:

http://www.oreilly.com/catalog/css/

For more information about this book and others, see the O'Reilly web site:

http://www.oreilly.com/



Library Navigation Links

Copyright © 2002 O'Reilly & Associates. All rights reserved.

text has a size of 24px . However, all of the texthas a line-height of 12px,since line-height is an inherited property. Whathappens is that the difference between font-sizeand line-height is divided in half, and thenapplied to the top and bottom of each element's content-heightto arrive at the inline box. Each halfof the divided difference is referred to ashalf-leading. markup would have the result shown in Figure 7-80:

OL LI {list-style-type: decimal;}
LI.off {list-style-type: none;}
<OL>
<LI>Item the first
<LI CLASS="off">Item the second
<LI>Item the third
<LI CLASS="off">Item the fourth
<LI>Item the fifthsmall-caps (Explorer 4 and 5, and Opera 3.5), onlyOpera and IE5 for Macintosh do what authors would expect in thedisplay of the text. Other versions of Explorer take the all-capitalsroute.



Figure 4-40

Figure 4-40. Percentage alignments can affect the height of a line

Of course, this sort of thing can lead to some fun visual effects, as we see in Figure 4-41:

SUB {vertical-align: -100%;}
SUP {vertical-align: 100%;}
<P>We can either <SUP>soar to new heights</SUP> or, instead,
<SUB>sink into despair...</SUB></P>
Figure 4-41

Figure 4-41. Percentages and fun effects

Since percentage values are meant to be percentages of thecause a line to break at a different spot than it ordinarily would have.

Turn to Figure 7-25 to see what happens when an inline element with a margin is displayed across multiple lines:

B {margin: 10px; background: silver;}
Figure 7-25

Figure 7-25. An inline element displayed across two lines of text with a 10-pixel margin

The left margin is applied to the beginning of the element, and the right margin to the end of it. Margins are not