The borderBottomStyle property is used for setting or getting the line style for an element’s bottom border.
Syntax
Following is the syntax for −
Setting the borderBottomStyle property
object.style.borderBottomStyle = value
Values
The property values are explained as follows −
Sr.No | Values & Description |
---|---|
1 | none This is the default value and defines no border. |
2 | hidden This is same as "none" but will still take border space. It is basically transparent but still there. |
3 | dotted This defines a dotted border. |
4 | dashed This defines a dashed border. |
5 | solid This defines a solid border. |
6 | double This defines a double border. |
7 | groove This defines a 3d groove border and is the opposite of ridge. |
8 | ridge This defines a 3D ridged border and is the opposite of groove. |
9 | inset This defines a 3D inset border and the effect looks like it is embedded. It produces the opposite effect of outset. |
10 | outset This defines a 3D inset border and the effect looks like it is embossed. It produces the opposite effect of inset. |
11 | initial For setting this property to initial value. |
12 | inherit To inherit the parent property value |
Example
Let us look at an example for the borderBottomStyle Property −
<!DOCTYPE html> <html> <head> <style> #DIV1{ width:300px; height:100px; border-bottom: 8px solid dodgerblue; border-bottom-style: groove; } </style> <script> function changeBottomStyle(){ document.getElementById("DIV1").style.borderBottomStyle="dashed"; document.getElementById("Sample").innerHTML="The bottom border style is now changed"; } </script> </head> <body> <div id="DIV1">SOME SAMPLE TEXT</div> <p>Change the div bottom border style size by clicking the below button</p> <button onclick="changeBottomStyle()">Change Bottom Style</button> <p id="Sample"></p> </body> </html>
Output
This will produce the following output −
On clicking the “Change Bottom Style” button −