CSS border-right Property


Set the style of the right border:

p {
    border-style: solid;
    border-right: thick double #ff0000;

Try it yourself »

Definition and Usage

The border-right shorthand property sets all the right border properties in one declaration.

The properties that can be set, are (in order): border-right-width, border-right-style, and border-right-color.

It does not matter if one of the values above are missing, e.g. border-right:solid #ff0000; is allowed.

Default value: not specified
Inherited: no
Animatable: yes, see individual properties. Read about animatable Try it
Version: CSS1
JavaScript syntax: object.style.borderRight="5px dotted blue" Try it

Browser Support

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

border-right 1.0 4.0 1.0 1.0 3.5

CSS Syntax

border-right: border-width border-style border-color|initial|inherit;

Property Values

Value Description
border-right-width Specifies the width of the right border
border-right-style Specifies the style of the right border
border-right-color Specifies the color of the right border
initial Sets this property to its default value. Read about initial
inherit Inherits this property from its parent element. Read about inherit

Related Pages

CSS tutorial: CSS Border

HTML DOM reference: borderRight property




Search w3schools.com:

Translate w3schools.com: