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

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

The properties border-bottom-color, border-top-color, border-left-color and border-right-color describe the border colours for each individual side of an HTML element.

Inherited: no

See also: border-color

Values

Any valid CSS colour value (see CSS colour reference).

Default value: none

Compatibility

CSS version: 2

Works in all CSS-capable browsers except Netscape 4.

Example

The following style rule gives the paragraph in the class funky a blue top border, yellow right border, red bottom border and green left border:

p.funky {
 border-top-color: blue;
 border-right-color: yellow;
 border-bottom-color: #ff0000;
 border-left-color: #0f0;
}

  

 

 

 

back to top