Book HomeCascading Style Sheets: The Definitive GuideSearch this book Saturday 29th of August 2015 05:01:58 AM

10.6. Borders

In CSS1, there are quite a few properties devoted to setting borders around element boxes, such as border-top-width and border-color, not to mention border itself. CSS2 adds a even more border properties, most of which are aimed at giving the author even more specific control of the borders. Before, it was difficult to set a specific color or style for a given side of the border, except through properties like border-left, and that could require more than one value. The new CSS2 properties address this, and their names are pretty self-explanatory:

padding: 10px; margin-top: 75px;"><P CLASSS="neg">A paragraph.</P></DIV>

As we can see from Figure 8-22, the paragraph hassimply been pulled upward by its negative top margin, such thatit's outside the parent DIV !

Figure 8-22

Figure 8-22. The effects of a negative top margin

border-right-color border-bottom-color border-left-color border-top-style border-right-style border-bottom-style border-left-style

Library Navigation Links

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

Figure 7-87

Figure 7-87. Bringing it all together

The values for list-style can be listed in anyorder, and any of them can be omitted. As long as one is present, therest will fill in their default values. For instance, the followingtwo rules will have the same visual effect:

LI.norm {list-style: url(img42.gif);}LI.odd {list-style: url(img42.gif) disc outside;} /* the same thing */