borderRightWidth Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderRightWidth

Description

The borderRightWidth property sets or gets the right border's width.

Property Values

Value Description
thina thin border
medium a medium border. Default
thick a thick border
length Set width of the border using length units
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: medium?
Return Value: A String, representing the width of an element's right border
CSS VersionCSS1

Get the width 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 red">This is a div element.</div>
<br>
<button type="button" onclick="myFunction()">Return the width of the right border</button>

<script>
function myFunction() {/*from  w ww.j  a  v a2s  . co  m*/
    console.log(document.getElementById("myDiv").style.borderRightWidth);
}
</script>

</body>
</html>

Related Tutorials