Name

border-top-width

Values:

thin | medium | thick | <length>

Initial value:

medium

Applies to:

All elements

Inherited:

No

Computed value:

Absolute length; 0 if the style of the border is none or hidden

Description:

Defines the width for the top border of an element, which will take effect only if the border’s style is something other than none. If the style is none, the width is effectively reset to 0. Negative length values are not permitted.

Examples:

ul {border-top-width: 0.5in;}
h1 {border-top-width: 1px;}

Get CSS Pocket Reference, 4th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.