border-width

The border-width shorthand CSS property sets the width of an element's border.

Initial value as each of the properties of the shorthand:border-top-width: mediumborder-right-width: mediumborder-bottom-width: mediumborder-left-width: medium
Applies to all elements. It also applies to ::first-letter.

Syntax

  
border-width: 1em;
  

Values

Defines the width of the border, either as an explicit nonnegative or a keyword. If it's a keyword, it must be one of the following values: thin A thin border medium A medium border thick A thick border Note: Because the specification doesn't define the exact thickness denoted by each keyword, the precise result when using one of them is implementation-specific. Nevertheless, they always follow the pattern thin ≤ medium ≤ thick, and the values are constant within a single document.

Browser support

border-widthchrome1edge12firefox1ie4opera3.5safari1

We use cookies to improve your experience. Learn more in our Privacy policy.

×