42 of 313 menu

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

selector { 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:

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

:

See also

byenru