CSS border-bottom-width Attribute
- Previous page border-bottom-style
- Next Page border-collapse
Definition and usage
The borderBottomWidth property sets the width of the bottom border of the element.
This property only takes effect when the border style is not none. If the border style is none, the border width is actually reset to 0. Negative length values are not allowed.
Note:Always declare the border-style property before the border-bottom-width property. The element must have a border before its border width can be changed.
See also:
CSS Tutorial:CSS Borders
CSS Reference Manual:border-bottom property
HTML DOM Reference Manual:borderBottomWidth property
Example
Set bottom border width:
p { border-style:solid; border-bottom-width:15px; }
CSS syntax
border-bottom-width: medium|thin|thick|length|initial|inherit;
Property value
Value | Description |
---|---|
thin | Define a thin bottom border. |
medium | Default value. Defines a medium bottom border. |
thick | Define a thick bottom border. |
length | Allows you to customize the width of the bottom border. |
inherit | Specify that the border width should be inherited from the parent element. |
More examples
- Set bottom border width
- This example demonstrates how to set the width of the bottom border.
Technical details
Default value: | medium |
---|---|
Inheritance: | no |
Version: | CSS1 |
JavaScript syntax: | object.style.borderBottomWidth="thick" |
Browser support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
1.0 | 4.0 | 1.0 | 1.0 | 3.5 |
Note:Browsers with IE7 and earlier versions do not support the value "inherit". IE8 requires !DOCTYPE. IE9 supports "inherit".
- Previous page border-bottom-style
- Next Page border-collapse