HTML and CSS Reference
In-Depth Information
Number of
values
Affected border(s), margin(s), or padding
The first value sets
top
and
bottom
; the second value sets
left
and
right
.
2
The first value sets
top
; the second sets both
left
and
right
; the third value sets
bottom
.
3
The first value sets
top
; the second sets
right
; the third
sets
bottom
; the fourth value sets
left
.
4
8.4.7.4. The border-width property
The
border-width
property lets you change the width of the border. Like
the
border-color
property, it accepts from one to four values that are
applied to the various borders in a similar manner (refer to
Table 8-1
).
Besides a specific length value, you may also specify the width of a bor-
der as one of the keywords
thin, medium
, or
thick
. The default value, if
the width is not explicitly set, is
medium
. Some typical border widths are:
border: 1px
border: thin thick medium
border: thick 2mm
The first example sets all four borders to exactly 1 pixel. The second
makes the top border
thin
, the right and left borders
thick
, and the bot-