down as the baseline of the next line of text (since a-100% vertical alignment will lower the baselinethe same distance as the font-size of the parentelement). Ordinarily, this would make the first line boxcorrespondingly taller, but since we're declaredline-height: 1px for the"S", the actual inline box is so small that it has almostno effect on the height of the line box. While the title shown inFigure 11-16 may not precisely match the title inFigure 11-14, they're very close to each other. gratis treffen kostenlos dating und flirten chat Monday 23rd of October 2017 02:43:05 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.

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

Figure 8-21

Figure 8-21. Examples of negative vertical margins

You'll notice the "pulling" effect of negative top

The basic reason the image isn't centered is that it isn't a block-level element. The only way to center an image using text-align is to wrap a DIV around the image, and set the DIV 's contents to be centered:

<DIV STYLE="text-align: center;">
<IMG SRC="shiny.gif" ALT="Shiny object">