Javascript examples for CSS Style Property:borderBottom
The borderBottom property sets or gets three border-bottom properties:
Parameter | Description |
---|---|
width | Sets the width of the bottom border |
style | Sets the style of the bottom border |
color | Sets the color of the bottom 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 bottom border of an element |
CSS Version | CSS1 |
Get a 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()">Test</button> <script> function myFunction() {/*w w w. j a v a 2s. co m*/ console.log(document.getElementById("myDiv").style.borderBottomWidth); } </script> </body> </html>