HTML and CSS Reference
In-Depth Information
Given these rules, the following declarations are synonymous and display a solid
border on the top and bottom of an element:
border-style: solid none solid none;
border-style: solid none solid;
border-style: solid none;
To render all border sides in the same style, only a single style value needs to be specified.
border-style: solid;
The border-style property has four subproperties that can also be used to target
each border side's style.
border-top-style: dotted;
border-right-style: dashed;
border-bottom-style: ridge;
border-left-style: inset;
border-width
The border-width property, which controls the width of borders, can be set with a unit
of length or with one of the predefined values: thin , medium , or thick . The initial value is
medium , which is typically rendered as 3 pixels.
border-width (1-4) | border-top-width |
border-right-width | border-bottom-width |
border-left-width :
<length> | thin | medium | thick
As with border-style , this property can have one to four values and has four
subproperties for setting the individual borders' width.
/* Shortcut property */
border-width: thin medium;
/* Full-length properties */
border-top-width: thin;
border-right-width: medium;
border-bottom-width: thin;
border-left-width: medium;
A width of zero means that no border is displayed. This value has the same effect as
setting the style of the border to none .
 
Search WWH ::




Custom Search