Using the Border Property


Unlike the margin and padding properties, the border property cannot set different values on the four sides. With border, you can only set all four sides to the same style, color, and width. To set different values on the four sides, you must use one or more of the other border properties.

The following style sheet puts a thick red border around elements of type DIV with CLASS "warning." Between the text and the border is half an em vertically and one em horizontally:

 DIV.warning {   border: solid red thick;   padding: 0.5em 1em; }



Cascading Style Sheets(c) Designing for the Web
Cascading Style Sheets: Designing for the Web (3rd Edition)
ISBN: 0321193121
EAN: 2147483647
Year: 2003
Pages: 215

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net