CSS border-bottom-color attribute

Definition and Usage

The border-bottom-color sets the color of the bottom border of the element.

Only pure colors can be defined, and the border can only appear when the border style is not none or hidden.

Note:Always declare the border-style property before the border-color property. The element must have a border before you change its color.

See Also:

CSS Tutorial:CSS Borders

CSS Reference Manual:border-bottom Property

HTML DOM Reference Manual:borderBottomColor Property

Example

Set the bottom border color:

p
  {
  border-style:solid;
  border-bottom-color:#ff0000;
  

Try It Yourself

CSS Syntax

border-bottom-color: color|transparent|initial|inherit;

Attribute Value

Value Description
color_name Specifies the border color with a color name (e.g., red).
hex_number Specifies the border color with a hexadecimal value (e.g., #ff0000).
rgb_number Specifies the border color with the rgb code (e.g., rgb(255,0,0)).
transparent Default Value. The border color is transparent.
inherit Specifies that the border color should be inherited from the parent element.

Technical Details

Default Value: not specified
Inheritance: no
Version: CSS1
JavaScript Syntax: object.style.borderBottomColor="blue"

More Examples

Set the bottom border color
This example demonstrates how to set the color of the bottom border.

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome IE / Edge Firefox Safari Opera
1.0 4.0 1.0 1.0 3.5

Note:Internet Explorer 6 (and earlier versions) do not support the attribute value "transparent".

Note:Browsers prior to IE7 do not support the value "inherit". IE8 requires !DOCTYPE. IE9 supports "inherit".