borderRightStyle Property - Javascript CSS Style Property

Javascript examples for CSS Style Property:borderRightStyle

Description

The borderRightStyle property sets or gets the right border's style.

Property Values

Value Description
noneNo border. This is default
hidden Same as "none", except for table elements
dotted a dotted border
dashed a dashed border
solid a solid border
double double line borders.
groove a 3D grooved border.
ridge a 3D ridged border.
inset a 3D inset border.
outset a 3D outset border.
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

Technical Details

Item Value
Default Value: none
Return Value: A String, representing the style of an element's right border
CSS VersionCSS1

Get right border of a <div> element:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

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

<script>
function myFunction() {//w  w  w  .  ja va2  s  .co  m
    console.log(document.getElementById("myDiv").style.borderRightStyle);
}
</script>

</body>
</html>

Related Tutorials