Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

CSS border-right-color property

CSS border-right-color property

Example

Set the color of the right border:

p

{

border-style:

solid

;

border-right-color:

#ff0000

}

Try it »


Property definition and usage

The border-right-color property sets the color of an element's right border.

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

Default value: not specified
Inherited: no
Version: CSS1
JavaScript syntax: object object.style.borderRightColor="blue"

Browser support

The numbers in the table indicate the first browser version that supports this property.

property
border-right 1.0 4.0 1.0 1.0 3.5

Attribute values

Value Description
color_name Specifies a border color whose value is a color name (such as red).
hex_number Specifies a border color whose value is a hexadecimal value (such as #ff0000).
rgb_number Specifies a border color whose value is an rgb code (such as rgb(255,0,0)).
transparent Default value. The border color is transparent.
inherit Specifies that the border color should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Border

CSS Reference Manual: border-right property