Name

border-style

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.).

Description:

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. Note that setting border-style to none (its default value) will result in no border at all. In such a case, any value of border-width will be ignored and the width of the border will be set to 0. Any unrecognized value from the list of values should be reinterpreted as solid.

Examples:

h1 {border-style: solid;}
img {border-style: inset;}

Supported by:

Firefox, Internet Explorer, Opera, Safari.

Get CSS Pocket Reference, 3rd 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.