B.10. border

A shorthand property that lets you set the same width, color, and style for all four borders of an element with a single property declaration. This property sets up identical borders on all four sides, but can be followed by side-specific border properties that modify them.

Inherited: No

See also: Section B.19border-width, Section B.18border-style, and Section B.16border-color

B.10.1. Value

You can specify a border-width value, a border-style value, and a border-color value, or any combination of the three, in any order, separated by spaces.

Initial value: none

B.10.2. Compatibility

CSS Version: 1

Works on all CSS-compatible browsers, with the same browser-specific limitations as the individual border- properties.

B.10.3. Example ...

Get HTML Utopia: Designing Without Tables Using CSS 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.