CSS Property - Border Color
Value: <color>{1,4}
Initial: the value of the 'color' property
Applies to: all elements
Inherited: no
Percentage values: N/A
The "border-color" property sets the color of the four borders. "border-color" can have from one to four values, and the values are set on the different sides like "border-width".
This property also applies to all of the following border colour elements:
- border-top-color
- border-right-color
- border-bottom-color
- border-left-color
If no color value is specified, the value of the "color" property of the element itself will take its place.
The following example will have a black solid border as it takes on the "color" property.
Example:
p{
color: #000000;
background: #FFFFFF;
border: solid;
}
This is the result
Using the following example you can specify all four border colours in one tag.
Example:
p{
border-color: red blue black red;
}
This is the result