Book HomeCascading Style Sheets: The Definitive GuideSearch this book Saturday 25th of October 2014 08:11:58 PM

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 this time right-justify the paragraph, as shown in Figure 8-48.

Figure 8-48

Figure 8-48. Line-box layout with right justification

Again, all we have here are the pieces of a single line of text whichhave been stacked on top of one another with their right sides linedup with each other. If we had set the paragraph to have atext-align of center, then thecenters of the line boxes would have lined up, and if it were set tojustify, then each line box would be forced to beas wide as the paragraph's content area. The difference is made 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:

border-top-color
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.

4.1.6. Text Decoration

Finally,we come to text-decoration, which is a fascinating property that carries along a whole truckload of oddities and inconsistencies in browsers. First, however, let's talk about how it should work in theory.

Figure 4-57. Various kinds of text decoration