Book HomeCascading Style Sheets: The Definitive GuideSearch this book Friday 19th of January 2018 12:53:17 AM

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.



Library Navigation Links required to support this type of effect.

7.5.4. Padding: Known Issues

In the first place, padding and Navigator 4.x just plain don't getalong. The main problem is that you can set padding on an elementwith a background color, but the background won't extend intothe padding unless you get very sneaky. You need to add a border, aswas discussed earlier in "Margins: Known Issues."

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

elements. For example, we could absolutely position an element andthen absolutely position one of its children, as shown in Figure 9-23.

Figure 9-23

Figure 9-23. Nested absolutely positioned elements

The small box B in the lower-left corner of the element A is a childof A, which is in turn a child of a relatively positionedDIV. B was absolutely positioned, as was elementA, using styles like these:

DIV {position: relative;}
Figure 8-43

Figure 8-43. The details of floating up and left with negative margins

The math in this situation works out something like this: assume thetop inner edge of the DIV is at the pixel position 100. The browser,in order to figure out where the top inner edge of the floatedelement should be will do this: 100px+ (-15px)margin + 0padding =85px . Thus the top inner edge of the floatedelement should be at pixel position 85; even though this is higher