CSS Reference Property
border-right 1l511g
The border-right property is a shorthand property used to specify the width, style and color of the right border of an element. 38312j
It is a shorthand property for the longhand properties: border-right-color
properties of an element.
The border-right
property can accept one, two or three arguments as a value—omitted values are set to their initial values.
Official Syntax 55184y
- Syntax:
border-right: <line-width> || <line-style> || <color>
- Initial:
0 none currentColor
, which is the concatenation of the initial values of the long-hand properties. - Applies To: all elements
- Animatable: The width and color of the border are animatable.
Values 584j31
- <line-width>
-
The width of the right border. Refer to the
border-right-width
property entry for a list of possible values. - <line-style>
-
The style of the right border. Refer to the
border-right-style
property entry for a list of possible values. - <color>
-
The color of the right border. Refer to the
border-right-color
property entry for a list of possible values.
Examples 3e5p5z
The following are all valid border-right
values set on an element.
.element { border-right: 1em; /* style and color are set to their initial values */ /* or */ border-right: dotted deepPink; /* width is set to its initial value (0), which means that no right border will be set */ /* or */ border-right: 1px dotted #eee; /* or */ border-right: 10px solid #009966; }
Browser k5t66
The property works in all major browsers: Chrome, Firefox, Safari, Opera, IE, and on Android and iOS.