More “Try it Yourself” examples below.
Definition and Usage
The border-bottom-width property sets the width of an element’s bottom border.
Note: Always declare the border-style or the border-bottom-style property before the border-bottom-width property. An element must have borders before you can change the width.
| Default value: | medium |
|---|---|
| Inherited: | no |
| Animatable: | yes. Read about animatable – Try it |
| Version: | CSS1 |
| JavaScript syntax: | object.style.borderBottomWidth=”5px” Try it |
CSS Syntax
border-bottom-width: medium|thin|thick|length|initial|inherit;
Property Values
| Value | Description | Code |
|---|---|---|
| medium | Specifies a medium bottom border. This is default | div { border-style:solid; border-bottom-width:medium; } |
| thin | Specifies a thin bottom border | div { border-style:solid; border-bottom-width:thin; } |
| thick | Specifies a thick bottom border | div { border-style:solid; border-bottom-width:thick; } |
| length | Allows you to define the thickness of the bottom border | div { border-style:solid; border-bottom-width:length; } |
| initial | Sets this property to its default value. Read about initial | div { border-style:solid; border-bottom-width:initial; } |
| inherit | Inherits this property from its parent element. Read about inherit |
