borderRightColor Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderRightColor

Description

The borderRightColor property sets or gets the right border's color.

Property Values

Value Description
color Set the color of the right border.
transparent The color of the right border is 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 right border
CSS VersionCSS1

Get the color of the right border of a <div> element

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
function myFunction() {//from  w  ww.j  av  a2s. c  om
    console.log(document.getElementById("myDiv").style.borderRightColor);
}
</script>

</body>
</html>

Related Tutorials