CSS border-right property
Example
Set the style of the right border:
p
{
border-style:
solid
;
border-right:
thick
double
#ff0000
;
}
Try it »
Property definition and usage
The border-right shorthand property sets all right border properties in a single declaration.
The properties that can be set are (in order): border-right-width, border-right-style, and border-right-color.
It is fine if one of the above values is missing, for example border-right: solid #ff0000; is allowed.
| Default value: | not specified |
|---|---|
| Inherited: | no |
| Version: | CSS1 |
| JavaScript syntax: | object object.style.borderRight="3px solid blue" |
Browser support





All major browsers support the border-right property.
NoteIE7 and earlier do not support the "inherit" value. IE8 requires a !DOCTYPE definition. IE9 supports "inherit".
Attribute values
| Value | Description |
|---|---|
| border-right-width | Specifies the right border width |
| border-right-style | Specifies the right border style |
| border-right-color | Specifies the right border color |
| inherit | Specifies that the value of the border-right property should be inherited from the parent element |
Related Articles
CSS Tutorial: CSS Borders