CSS border-bottom Property
Description
The border-bottom CSS property targets only the bottom edge of an element's box, allowing you to draw, style, or remove the line that sits under an element without affecting the other three edges. Because it is edge-specific, it is commonly used for visual separators (for example, underlining headings or list items) and for subtle interface cues such as focus indicators or dividing lines in layouts. Conceptually it is part of the element's border layer in the box model, so it is painted with the rest of the border and can be combined with background and foreground visuals to achieve the intended effect.
This property interoperates with the broader border system: the shorthand border can override edge-specific settings, and the edge's appearance is determined by the combination of the corresponding border-style, border-width, and border-color values for that edge. Because those constituent properties govern style, thickness, and color respectively, controlling them separately or via shorthand gives you precise control over how the bottom edge is rendered relative to the rest of the element. Note that border properties do not inherit from parent elements; they apply to each element independently.
In layout terms, the bottom border participates in the element's box sizing and painting order. Whether that border increases the element's outer footprint or is accounted for inside the declared size depends on box-sizing and how you size the element. Rounded corners and clipping can affect how a bottom border appears at a corner; the interaction with corner shaping is governed by border-radius, which can trim or round the border at the join points. For cases where you want a decorative line that sits outside normal layout flow or doesn't change element geometry, the separate outline property or pseudo-elements are often used instead.
Beyond simple static lines, the bottom border is frequently used as a visual target for transitions and animations (for example animating visibility or thickness changes) or for creating underlines that appear on hover/focus. It also plays a role when using image-based decorations via border-image, where the image can replace or augment the drawn bottom edge. Because the bottom border is a discrete, controllable element of the rendering stack, it gives designers a flexible and performant way to add horizontal delineation and emphasis without additional markup.
Definition
- Initial value
- See individual properties
- Applies to
- All elements
- Inherited
- No
- Computed value
- See individual properties
- Animatable
- Yes
- JavaScript syntax
- object.style.borderBottom
Interactive Demo
Syntax
border-bottom: <line-width> || <line-style> || <color>
Values
- <line-width>See border-bottom-width CSS property for values.
- <line-style>See border-bottom-style CSS property for values.
- <color>See border-bottom-color CSS property for values.
- inherit
Example
Browser Support
The following information will show you the current browser support for the CSS border-bottom property. Hover over a browser icon to see the version that first introduced support for this CSS property.
This property is supported by all modern browsers.
Desktop
Tablets & Mobile
Last updated by CSSPortal on: 1st January 2026
