border-bottom-color
Definition
border-bottom-color
is a CSS property that sets the color of the bottom border of an element. It is used in conjunction with border-bottom-style and border-bottom-width to define the bottom border of an element.
Examples
Hex code
.element {
border-bottom-color: #ff0000;
}
Keyword
.element {
border-bottom-color: red;
}
Color function
.element {
border-bottom-color: rgb(255, 0, 0);
}
Global values
.element {
border-bottom-color: inherit;
border-bottom-color: initial;
border-bottom-color: unset;
}
Values
Value | Description |
---|---|
<color> | Specifies the color of the border. Can be a keyword, a hex code, or a color function. |
inherit | The element inherits the border-bottom-color value from its parent element. |
initial | Sets the border-bottom-color to its default value. |
unset | The element's border-bottom-color is set to the value specified in the user agent's style sheet, if any. If there is none, it will be the default value. |
Best Practices
- Use a clear and readable color for the border to improve the accessibility and usability of your site.
- Avoid using too many different border colors on a single page as it can be visually overwhelming.
- Make sure the border color matches the overall design and color scheme of your site.
- Use the
border-bottom-color
property in conjunction with theborder-bottom-style
andborder-bottom-width
properties to fully define the bottom border of an element.
Browser Compatibility
Chrome | Firefox | Safari | Internet Explorer | Microsoft Edge | Opera |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |