Easy Tutorial
❮ Css3 Pr Align Self Pr Text Letter Spacing ❯

CSS border-color Property

Example

Set the color of the four borders:


Property Definition and Usage

The border-color property sets the color of an element's four borders. This property can have from one to four values.

Example:

border-color: red, green, blue, pink;

border-color: red, green, blue;

border-color: red, green;

border-color: red;

Note: Always declare the border-style property before the border-color property. An element must have borders before you can change the color.

Default value: not specified
Inherited: no
--- ---
Version: CSS1
--- ---
JavaScript syntax: object.style.borderColor="#FF0000 blue"
--- ---

Browser Support

The numbers in the table specify the first browser version that fully supports the property.

Property
border-color 1.0 4.0 1.0 1.0 3.5

Property Values

Value Description
color Specifies the border color. Look at CSS Color Values
transparent Specifies that the border color should be transparent. This is default
inherit Specifies that the border color should be inherited from the parent element

Related Articles

CSS Tutorial: CSS Border

❮ Css3 Pr Align Self Pr Text Letter Spacing ❯