border-bottom-style
Definition
The border-bottom-style
property is a CSS property that specifies the style of the bottom border of an element. It is used to control the appearance of the element's bottom border.
Examples
No border
.element {
border-bottom-style: none;
}
Hidden border
.element {
border-bottom-style: hidden;
}
Dotted border
.element {
border-bottom-style: dotted;
}
Dashed border
.element {
border-bottom-style: dashed;
}
Solid border
.element {
border-bottom-style: solid;
}
Double border
.element {
border-bottom-style: double;
}
Groove border
.element {
border-bottom-style: groove;
}
Ridge border
.element {
border-bottom-style: ridge;
}
Inset border
.element {
border-bottom-style: inset;
}
Outset border
.element {
border-bottom-style: outset;
}
Values
Value | Description |
---|---|
none | No border is drawn. |
hidden | Same as none , but has different behavior in some contexts. |
dotted | The border is a series of dots. |
dashed | The border is a series of short lines. |
solid | The border is a solid line. |
double | The border is two solid lines. |
groove | The border looks like a groove. |
ridge | The border looks like a ridge. |
inset | The border looks like it is embedded in the element. |
outset | The border looks like it is coming out of the element. |
initial | Sets the border-bottom-style to its default value. |
inherit | The element inherits the border-bottom-style value from its parent element. |
unset | The element's border-bottom-style 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 the appropriate border style for the context and design of your site.
- Avoid using too many different border styles on a single page as it can be visually overwhelming.
- Make sure the border style matches the overall design and layout of your site.
- Use the
border-bottom-style
property in conjunction with theborder-bottom-color
andborder-bottom-width
properties to fully define the bottom border of an element. - Consider the layout and hierarchy of your content when deciding which border style to use. For example, you may want to use a solid border for header elements but a dotted
Browser Compatibility
Chrome | Firefox | Safari | Internet Explorer | Microsoft Edge | Opera |
---|---|---|---|---|---|
Yes | Yes | Yes | Yes | Yes | Yes |