The border-right property

The border-right property specifies a color, type, and width for a right border. It is a shorthand property for border-right-width, border-right-style and border-right-color.

Syntax

cssselector {
  border-right: width type color;
}

The order of the properties does not matter.

Example

Let's give the element a black right border with 2px width:

html<div id="elem"></div>
css#elem {
  border-right: 2px solid black;
  background: #f9f9f9;
  width: 300px;
  height: 100px;
}

Результат:

See also