border-colorNN 4 IE 4 CSS 1

Inherited: No

This is a shortcut attribute that lets you set multiple border edges to the same or different colors. Navigator 4 allows only a single value, which applies to all four edges. For Internet Explorer and Netscape 6, you may supply one to four space-delimited color values. The number of values determines which sides receive the assigned colors.

 
CSS Syntax
 
border-color: color {1,4}
 
Value

For Navigator 4, one color value only. In Internet Explorer and Netscape 6, this attribute accepts one, two, three, or four color values, depending on how many and which borders you want to set with specific colors. Value quantities and positions are interpreted as shown in the following table.

Number of valuesEffect
1All four borders set to value
2Top and bottom borders set to the first value, right and left borders set to the second value
3Top border set to first value, right and left borders set to second value, bottom border set to third value
4Top, right, bottom, and left borders set, respectively
 
Initial Value

The element's color style property (which is inherited if not specifically assigned for the element).

 
Example
 
h2 {border-color: red blue red}
div {border-color: red rgb(0,0,255) red}
 
Applies To

All elements, but only block and replaced elements in IE 4 and 5 for Windows.

 
Object Model Reference
 
[window.]document.getElementById("elementID").style.borderColor