border-style: ***; border-***-style: ***;
Browser |
|
---|
The border-style and border-***-style properties sets the border style of an element.
(*** = top, bottom, left, and right)
- border-style : This is a shorthand property for setting the style for the four borders.
- border-***-style : Sets the style of the top, bottom, left, and right borders.
div {
border-width: thick;
border-color: red;
border-style: solid;
}
p {
border-width: medium;
border-color: red;
border-top-style: solid;
border-right-style: double;
border-bottom-style: dotted;
border-left-style: dashed;
}
border-style : This is a shorthand property for setting the style for the four borders.
Property | Value | Explanation |
---|---|---|
border-style | solid, double, groove,ridge, inset, outset,dotted, dashed, none |
the top, bottom, left, and right borders |
The default is "none".
border-style: solid;
: [all sides] bordersborder-style: dashed double;
: [top, bottom] [left, right] bordersborder-style: dashed double dotted;
: [top] [left, right] [bottom] bordersborder-style: solid dashed double dotted;
: [top] [right] [bottom] [left] borders
border-***-style : Sets the style of the top, bottom, left, and right borders.
Property | Value | Explanation |
---|---|---|
border-top-style | solid, double, groove,ridge, inset, outset,dotted, dashed, none |
the top border |
border-right-style | the right border | |
border-bottom-style | the bottom border | |
border-left-style | the left border |
The default is "none".
The styles example
solid
double
groove
ridge
inset
outset
dotted
dashed
none (Default)