CSS border-top-style property
Browser support · legacy reference
ChromeFully supports
SafariFully supports
FirefoxFully supports
Internet ExplorerFully supports
EdgeFully supports
OperaFully supports
Description
CSS border-top-style property defines style for the top side border of a block.
Syntax
border-top-style : none | hidden | dashed | solid | dotted | double | ridge | groove | inset | outset
Property values
noneDefault
-
There is no style. In this case, the color and width of top border are also ignored i.e. 0px border.
- Try it
border-top-style: none; hidden
-
It is same as 'none' but resolve to different results for the border-collapse property in tables.
- Try it
border-top-style: hidden; double
-
The top border consists of two lines. The total border-width equals to the two lines and space between them.
- Try it
border-top-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 top border is darker than the inner side of the top border.
- Try it
border-top-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 top border is darker than the outer side of the top border.
- Try it
border-top-style: groove;
Applicable to
It applies to all elements