B.11. border-bottom, border-left, border-right, border-top

These four properties are shorthand properties that let you set the style, width, and color of the border on a particular side of an element with single property declaration.

Inherited: No

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

B.11.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.11.2. Compatibility

CSS Version: 1

Works in all CSS-compatible browsers, with exception of Netscape 4.

B.11.3. Example

Applies a 1 pixel thick, dashed, blue border to the bottom of elements with a title attribute:

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.