Back to CSS1 Reference | CSS1 Properties
Prev border-top-width | Next clear


Property
border-width
Values
thin, medium, thick, <length>
Initial
not defined for shorthand properties
Inherited
no

This property is a shorthand property for setting 'border-top-width', 'border-right-width', 'border-bottom-width' and 'border-left-width' at the same place in the style sheet.

There can be from one to four values, with the following interpretation:

one value
all four border widths are set to that value
two values
top and bottom border widths are set to the first value, right and left are set to the second
three values
top is set to the first, right and left are set to the second, bottom is set to the third
four values
top, right, bottom and left, respectively
In the examples below, the comments indicate the resulting widths of the top, right, bottom and left borders:

      H1 { border-width: thin }                   /* thin thin thin thin */
      H1 { border-width: thin thick }             /* thin thick thin thick */
      H1 { border-width: thin thick medium }      /* thin thick medium thin */
      H1 { border-width: thin thick medium thin } /* thin thick medium thin */

Border widths cannot be negative.

Log in or registerto write something here or to contact authors.