HTML and CSS Reference
In-Depth Information
The border-color property can be used to specify the color of all four borders
individually in the standard top, right, bottom, left style:
margin
1
border-top-color
padding
2
4
Content
3
border-bottom-color
A single value copies the color to all border sides. With two values, the first sets the
border color of the top and bottom, and the second sets the border color of the right and left.
With three values, the first sets the border color of the top, the second sets the color of the
right and left, and the third sets the color of the bottom. With four values, each color is set
individually in the order top, right, bottom, and left.
Examples
p {border-style: solid; border-width: thin; border-color: blue;}
#d1 {border-style: double; border-color: #0000EE;}
#rainbow {border-color: red green blue orange;}
Compatibility
CSS 1, 2, 3 IE 4, 5 (buggy) 5.5+ Netscape 4 (buggy), 6+, Firefox 1+ Opera 4+, Safari 1+
Note
• All borders are set at once, but individual color 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-color , border-right-color , and so on.
border-left
This property defines in a shorthand form the width, style, and color for the left border of
an element.
Syntax
border-left: border-width border-style border-color;
 
Search WWH ::




Custom Search