Style borderBottomStyle Property

Definition and Usage

borderBottomStyle Sets or returns the style of the bottom border of the element.

See also:

CSS Tutorial:CSS Border

CSS Reference Manual:border-bottom-style property

HTML DOM Reference Manual:border property

Instance

Example 1

Add a solid bottom border to the <div> element:

document.getElementById("myDiv").style.borderBottomStyle = "solid";

Try it yourself

Example 2

Change the style of the bottom border of the <div> element to "dotted":

document.getElementById("myDiv").style.borderBottomStyle = "dotted";

Try it yourself

Example 3

Returns the bottom border style of the <div> element:

alert(document.getElementById("myDiv").style.borderBottomStyle);

Try it yourself

Example 4

Demonstration of all different values:

var listValue = selectTag.options[selectTag.selectedIndex].text;
document.getElementById("myDiv").style.borderBottomStyle = listValue;

Try it yourself

Syntax

Return borderBottomStyle property:

object.style.borderBottomStyle

Set borderBottomStyle property:

object.style.borderBottomStyle = value

Attribute value

Value Description
none Defines a border without a border. Default.
hidden Same as "none", except in resolving border conflicts for table elements.
dotted Defines a dotted border.
dashed Defines a dashed border.
solid Defines a solid border.
double Defines two borders. The width of both borders is the same as the value of border-width.
groove Defines a 3D groove border. The effect depends on border-color for the values.
ridge Defines a 3D ridge border. The effect depends on border-color for the values.
inset Defines a 3D inset border. The effect depends on border-color for the values.
outset Defines a 3D outset border. The effect depends on border-color for the values.
initial Sets this property to its default value. See initial.
inherit Inherits this property from its parent element. See inherit.

Technical details

Default value: none
Return value: A string representing the style of the element's bottom border.
CSS Version: CSS1

Browser support

The numbers in the table indicate the first browser version that fully supports this property.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
1.0 5.5 1.0 1.0 9.2

Note:IE7 and earlier versions do not support the value "hidden". IE9 and later versions support "hidden".