CSS:border-bottom
From MDC
[edit] Summary
The border-bottom property is a shorthand property that sets the values of border-bottom-color, border-bottom-style, and border-bottom-width. 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
[edit] Syntax
border-bottom: [ <border-width> || <border-style> || <border-color> ] | inherit
[edit] Values
- <border-width>
- See
border-bottom-width. - <border-style>
- See
border-bottom-style. - <border-color>
- See
border-bottom-color.
[edit] Examples
element {
border-bottom-width: 1px solid #000;
}
[edit] 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.
[edit] Specifications
[edit] Browser compatibility
| Browser | Lowest Version |
|---|---|
| Internet Explorer | 4 |
| Firefox | 1 |
| Netscape | 4 |
| Opera | 3.5 |
[edit] See also
border,
border-bottom,
border-bottom-width,
border-bottom-style,
border-bottom-color,