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


Property
border-top-width
Values
thin, medium, thick, <length>
Initial
'medium'
Inherited
no

This property sets the width of an element's top border. The width of the keyword values are UA dependent, but the following holds: 'thin' <= 'medium' <= 'thick'.

The keyword widths are constant throughout a document:

      H1 { border: solid thick red }
      P  { border: solid thick blue }

In the example above, 'H1' and 'P' elements will have the same border width regardless of font size. To achieve relative widths, the 'em' unit can be used:

      H1 { border: solid 0.5em }

Border widths cannot be negative.

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