Name

border-width

Synopsis

This shorthand property can be used to set the width for the overall border of an element or for each side individually. The width will take effect for a given border only if the border’s style is something other than none. If the border style is none, then the border width is effectively reset to 0. Negative length values are not permitted.

Values:

[ thin | medium | thick | <length> ]{1,4} | inherit

Initial value:

not defined for shorthand properties

Applies to:

all elements

Inherited:

no

Computed value:

see individual properties (border-top-style, etc.)

Get Cascading Style Sheets: The Definitive Guide, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.