XML technologies / CSS / Advanced websites with CSS / CSS property reference / border-bottom, border-top, border-left, border-right

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The shorthand properties border-top, border-bottom, border-left and border-right describe the style, width and colour of a border for each side of an HTML element.

Inherited: no

See also: border-width, border-style and border-color

Values

border-width, border-style and border-color each receive a valid value. The values are separated by spaces.

Default value: none

Compatibility

CSS version: 1

Works in all CSS-capable browsers except Netscape 4.

Example

The following style rule gives the bottom side of all HTML elements with a title attribute a dashed blue line one pixel wide:

[title] {
 border-bottom: dashed blue 1px; 
}

Note that, in this example, distinctions based on the HTML attribute are not currently supported by any browser.

  

 

 

 

back to top