CSS border-top-width

The CSS border-top-width property allows you to set the width of a top border.

Note: You will also need to specify border-top-color and border-top-style before your border-top-width is displayed.

Syntax: border-top-width: <border-width>
Possible Values:
  • thin
  • medium
  • thick
  • length (for example, 1px)
  • inherit
Initial Value: Medium
Applies to: All elements.
Inherited: Yes
Media: Visual
Example: div.border-width {border-top-width:thick}
Try it yourself!