CSS GUIDE BORDER BOTTOM
Contents
Summary
The border-bottom property is a shorthand property that sets the values of border-bottom-width, border-bottom-style, and border-bottom-color. These properties describe the bottom border of elements.
- Initial value: see individual properties for details
- Applies to: all elements
- Inherited: no
- Percentages: N/A
- Media: visual
- Computed value: see individual properties
Syntax
border-bottom: [ <border-width> || <border-style> || <border-color> ] | inherit
Legal Values
border-width
- See border-bottom-width.
border-style
- See border-bottom-style.
border-color
- See border-bottom-color.
Mozilla Recommended Values
Usage Examples
element { border-bottom-width: 1px solid #000; }
Notes
The three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
As with all shorthand properties, border-bottom always sets the values of all of the properties that it can set, even if they are not specified. It sets those that are not specified to their default values. This means that:
border-bottom-style: dotted; border-bottom: thick green;
is actually the same as
border-bottom-style: dotted; border-bottom: none thick green;
and the value of border-bottom-style given before border-bottom is ignored.
Since the default value of border-bottom-style is none, not specifying the <border-style> part of the value means that the property specifies no border.
Specification Conformance
Browser Compatibility
Browser | Lowest Version |
---|---|
Internet Explorer | 4 |
Firefox | 1 |
Netscape | 4 |
Opera | 3.5 |
See Also
border, border-bottom-width, border-bottom-style, border-bottom-color