Javascript examples for CSS Style Property:borderRight
The borderRight property sets or gets three border-right properties:
Parameter | Description |
---|---|
width | Sets the width of the right border |
style | Sets the style of the right border |
color | Sets the color of the right border |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | not specified |
Return Value: | A String, representing the width, style and/or color of the right border of an element |
CSS Version | CSS1 |
Get a right border width of a <div> element
<!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 w w . j a va2 s. com console.log(document.getElementById("myDiv").style.borderRightWidth); } </script> </body> </html>