CSS border-right-color Property

Set a color for the right border:

div {border-right-color: coral;}

Try it Yourself »

More “Try it Yourself” examples below.


Definition and Usage

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

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

Default value: black
Inherited: no
Animatable: yes. Read about animatable – Try it
Version: CSS1
JavaScript syntax: object.style.borderRightColor=”blue” Try it
CSS Syntax
border-right-color: color|transparent|initial|inherit;
Property Values
Value Description
color Specifies the color of the right border. Look at CSS Color Values for a complete list of possible color values. Default color is black
transparent Specifies that the border color should be transparent
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Set a color for the right border with a HEX value:

div {border-right-color: #92a8d1;}

Try it Yourself »

 

Set a transparent right border:

div {border-right-color: transparent;}

Try it Yourself »

Post Author: Zahid Farid