Javascript examples for CSS Style Property:borderBottomWidth
The borderBottomWidth property sets or gets the width of the bottom border.
Value | Description |
---|---|
thin | a thin border |
medium | a medium border. Default |
thick | a thick border |
length | Sets width of the border in length units |
initial | Sets this property to its default value. |
inherit | Inherits this property from its parent element. |
Item | Value |
---|---|
Default Value: | medium? |
Return Value: | A String, representing the width of an element's bottom border |
CSS Version | CSS1 |
Get the width of the bottom border of a <div> element
<!DOCTYPE html> <html> <body> <div id="myDiv" style="border-bottom:thick solid red">This is a div element.</div> <br> <button type="button" onclick="myFunction()">Return the width of the bottom border</button> <script> function myFunction() {/*w ww . java 2s .com*/ console.log(document.getElementById("myDiv").style.borderBottomWidth); } </script> </body> </html>