CSS border-right property
Description
CSS border-right property defines the width, style, and color for the right side border of a box. It is a shorthand property of border-right-width, border-right-style, and border-right-color.
Syntax
border-right : border-right-width border-right-style border-right-color;
Property values
border-right-width
mediumDefault
-
medium value represents medium sized border for the right side. thin≤medium≤thick
border-right-width: medium;
thin
-
thin value defines thin line border for the right side.
border-right-width: thin;
thick
-
thick value defines a thick line border for the right side.
border-right-width: thick;
+ve length
-
lenght defines the line width of border for the right side. The used units might be px, in, em, pt.
border-right-width: 10px;
border-right-style
solidDefault
-
The right border consists of a solid line.
border-right-style: solid;
none
-
There is no style. In this case, the color and width of top border are also ignored i.e. 0px border.
border-right-style: none;
hidden
-
It is same as 'none' but resolve to different results for the border-collapse property in tables.
border-right-style: hidden;
dashed
-
The right border consists of a series of square shaped dashes.
border-right-style: dashed;
dotted
-
The right border consists of a series of round dots.
border-right-style: dotted;
double
-
The right border consists of two lines. The total border-right-width equals to the two lines and space between them.
border-right-style: double;
ridge
-
The content seems to be coming out of the canvas. It is obtained by producing the box-shadow from the two colors that are lighter and darker than the border-color.
The outer side of the right border is darker than the inner side of the right border.
border-right-style: ridge;
groove
-
The content seems to be going into the canvas. It is obtained by producing the box-shadow from the two colors that are lighter and darker than the border-color.
The inner side of the right border is darker than the outer side of the right border.
border-right-style: groove;
inset
-
The color of top and left borders is darker than border-color but the color of right and right borders is the same as border-color.
The effect of inset value can be observed in border.
border-right-style: inset;
outset
-
The color of top and left sides is the same as border-left but the color of right and right sides is darker than border-color.
The effect of inset value can be observed in border.
border-right-style: outset;
border-right-color
currentColorDefault
-
currentColor keyword represents the same color for the right side border as of text color.
border-right-color: currentColor;
color-name
-
The following demo represents skyblue color for the right side border.
border-right-color: skyblue;
rgb value
-
It represents rgb value of a color.
The hexadecimal value of red color for the right side border is given below.
border-right-color: rgb(255,0,0);
hexadecimal value
-
It represents hexadecimal notation of red color.
The hexadecimal notation of blue color for the right side border is given below.
border-right-color: #0000ff;
Applicable to
See longhand properties
From web4college, the free CSS digger
#CSS digger
Was this article helpful?