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
-
the
border-left
property
that specifies a left border -
the
border-top
property
that specifies a top border -
the
border-bottom
property
that specifies a bottom border -
the
border-right-color
property
that sets a color of a right border -
the
border-right-width
property
that sets a width of a right border