CSS border-right Property

Description

The border-right property is a shorthand that sets the values of border-right-color, border-right-style, and border-right-width. These properties describe the right border of elements.

Initial value
See individual properties
Applies to
All elements
Inherited
No
Media
Visual
Computed value
See individual properties
Animatable
Yes
CSS Version
CSS1, CSS2, CSS3
JavaScript syntax
object.style.borderRight

Syntax

border-right: <line-width> || <line-style> || <color> 

Values

Example

<div class="border">This is an example of the border-right property using a red solid border 3px in width.</div>
.border {
   border: 1px solid blue;
   border-right: 3px solid red;
   margin: 20px;
   padding: 20px;
}

Give it a Try

Click the button below to experiment with this property.

Give it a Try!

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
5.512119.21
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
≤371814Yes1?

Last updated by CSSPortal on: 12th October 2019