Name

border-style

Synopsis

This shorthand property can be used to set the styles for the overall border of an element, or for each side individually. The value of any border must be something other than none for the border to appear. In CSS1, HTML user agents were only required to support solid and none.

Values:

[ none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset ]{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.)

Note:

HTML user agents are only required to support solid and none; the rest of the values (except for hidden) may be interpreted as solid

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.