an element can induce an offset for child elements. Vertical marginsare still collapsed, as shown in Figure 8-18:

DIV {margin: 20px; padding: 20px;}P {margin: 10px; padding: 10px;}
Figure 8-18

Figure 8-18. Offset is implicit in the parent's margins and padding

8.2.2.4. Negative margins

So far, this probably all seems rather gratis treffen kostenlos dating und flirten chat Saturday 25th of June 2016 08:52:40 AM

Book Home

Cascading Style Sheets: The Definitive GuideSearch this book

Index

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.

TD.nav {background-image: url(darkgrid.gif);}
Figure 6-25

Figure 6-25. Setting a background image for a table cell

You could even, in theory, apply images to the background of replaced elements like TEXTAREAs and SELECT lists, although user agents aren't very good about that sort of thing yet -- in fact, as of this writing, no browser will correctly place images in the backgrounds of form elements. own. This prevents a situation where a succession of floated elementscould appear in a horizontal line and far exceed the edges of thecontaining block. Instead, if a float would stick out of itscontaining block by appearing next to another one, it is floated downto a point below any previous floats, as illustrated by Figure 8-36 (where the floats start on the next line inorder to more clearly illustrate the principle at work here). Thisrule first appeared in CSS2, to correct its omission in CSS1.

Figure 8-36

Figure 8-36. If there isn't room, floats get pushed to a new line

8. A floating element must be placed as high as