Block-levelreplaced elements are also subject to a few differences in howformatting is handled. The most important is that replaced elementsare assumed to have an intrinsic height and width; for example, animage will be a certain number of pixels high and wide. Given this,if either height or width areset to auto for a replaced element, then the valuewill always evaluate to the intrinsic height or width of the element.
Copyright © 2000 O'Reilly & Associates, Inc. All rights reserved.
Printed in the United States of America.
Published by O'Reilly & Associates, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472.
Nutshell Handbook, the Nutshell Handbook logo, and the O'Reilly logo are registered trademarks of O'Reilly & Associates, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O'Reilly & Associates, Inc. was aware of a trademark claim, the designations have been printed in caps or initial caps. The association between the image of a koala and the topic of HTML and XHTML is a trademark of O'Reilly & Associates, Inc.
While every precaution has been taken in the preparation of this book, the publisher assumes no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
Copyright © 2002 O'Reilly & Associates. All rights reserved.Eachof these isused to set the width on a specific border side, of course, just aswith the margin properties.
- Valueswould combine with the user's white background to yield totallyunreadable links.
18.104.22.168. Real-world issues
That's pretty much all there is to setting a background color.Well, except for one more small warning: Navigator 4 gets the placement ofbackground colors completely wrong. Instead of applying thebackground color to the entire content box and padding, the coloronly appears behind the text itself, as shown in Figure 6-17.
Again, the similarity would be only visual in nature.
By using negative values, it is possible to position an elementoutside its containing block. For example, thefollowing values will lead to the result shown in Figure 9-3:top: -5em; bottom: 50%; left: 75%; right: -3em;
Figure 9-3. Positioning an element beyond its containing block
Now let's see why leaving out width andheight isn't always a bad thing inpositioning, as well as how declaring them can work to yourconsequences of one's actions.
11.2.1. Making Styles Work
Even better, you can string more than one child selector together to precisely target a given type of element. Take this, for example:
Figure 10-4. Selecting grandchildren only
The first list item in the source is silver because it's the child of an ordered list that is itself the child of a BODY. The second list item in the source is the