borderBottomColor Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderBottomColor

Description

The borderBottomColor property sets or gets the bottom border's color.

Property Values

Value Description
color Set bottom border's color. Default color is black
transparent Set bottom border's color to transparent
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: black
Return Value: A String, representing the color of an element's bottom border
CSS VersionCSS1

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

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<div id="myDiv" style="border-bottom:thick solid green">This is a div.</div>
<br>
<button type="button" onclick="myFunction()">Return bottom border color</button>

<script>
function myFunction() {//from   ww w.  j  a v a 2 s . c om
    console.log(document.getElementById("myDiv").style.borderBottomColor);
}
</script>

</body>
</html>

Related Tutorials