HTML and CSS Reference
In-Depth Information
The shorthand style allows individual borders to be set in the standard top, right, bottom,
left style:
margin
1
border-top-style
padding
2
4
Content
3
border-bottom-style
A single value copies the style to all border sides. With two values, the first sets the border
style of the top and bottom, and the second sets the border style of the right and left. With
three values, the first sets the style of the top border, the second sets the style of the right and
left borders, and the third sets the style of the bottom border. With four values, the style of
each border is set individually in the order top, right, bottom, and left. In general, missing
values are inferred from the value defined for the opposite side.
Examples
p {border-style: solid;}
.twosides {border-style: dashed solid;}
.allsides {border-style: solid dashed groove inset;}
Compatibility
CSS 1, 2, 3
IE 4, 5 (no dotted/dashed), 5.5+ Netscape 4+ (buggy),
6+, Firefox 1+
Opera 5+, Safari 1+
Note
• All borders are set at once, but individual style values can be set with the shorthand
border-top , border-right , border-bottom , and border-left , as well as with
the specific properties border-top-style , border-right-style , and so on.
 
Search WWH ::




Custom Search