Style borderBottomColor Property

Definition and Usage

borderBottomColor Sets or returns the color of the element's bottom border.

See Also:

CSS Tutorial:CSS Borders

CSS Reference Manual:border-bottom-color Property

HTML DOM Reference Manual:border Property

Example

Example 1

Changes the color of the bottom border of the <div> element to red:

document.getElementById("myDiv").style.borderBottomColor = "red";

Try It Yourself

Example 2

Returns the color of the bottom border of the <div> element:

alert(document.getElementById("myDiv").style.borderBottomColor);

Try It Yourself

Syntax

Return borderBottomColor Property:

object.style.borderBottomColor

Set borderBottomColor Property:

object.style.borderBottomColor = "color|transparent|initial|inherit"

Property Value

Value Description
color

Specifies the color of the bottom border. The default is black.

Please see CSS Color Values, for a complete list of possible color values.

transparent The bottom border color is transparent (the underlying content will show through).
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical Details

Default Value: black
Return Value: A string representing the color of the element's bottom border.
CSS Version: CSS1

Browser Support

The numbers in the table indicate the first browser version to fully support this attribute.

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