Style borderBottom Property
- Previous page border
- Next page borderBottomColor
- Go back one level HTML DOM Style Object
Definition and Usage
borderBottom
Properties are set or returned in a shorthand form for up to three separate border-bottom properties.
With this property, you can set/return the following one or more (in any order):
See Also:
CSS Tutorial:CSS Border
CSS Reference Manual:border-bottom Property
HTML DOM Reference Manual:border Property
Example
Example 1
Add a bottom border to the <div> element:
document.getElementById("myDiv").style.borderBottom = "thick solid #0000FF";
Example 2
Change the width, style, and color of the <div> element's bottom border:
document.getElementById("myDiv").style.borderBottom = "thin dotted red";
Example 3
Returns the border-bottom property value of the <div> element:
alert(document.getElementById("myDiv").style.borderBottom);
Syntax
Returns the borderBottom property:
object.style.borderBottom
Sets the borderBottom property:
object.style.borderBottom = "width style color|initial|inherit"
Property Value
Value | 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. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical Details
Default Value: | not specified |
---|---|
Return Value: | A string representing the width, style, and/or color of the element's bottom border. |
CSS Version: | CSS1 |
Browser Support
The numbers in the table indicate the first browser version to fully support this property.
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
- Previous page border
- Next page borderBottomColor
- Go back one level HTML DOM Style Object