CSS border-bottom-width Property
The border-bottom-width property in CSS is used to specify the thickness (width) of the bottom border of an element.
1. Syntax
Accepted Values:
-
thin→ A thin bottom border -
medium(default) → A medium bottom border -
thick→ A thick bottom border -
Length values → Custom width using units like
px,em,rem,%, etc.
2. Example – Using Named Widths (thin, medium, thick)
✅ The bottom border of each box will have a different thickness.
3. Example – Using Custom Pixel Values
✅ The div will have a 5px solid blue bottom border.
4. Example – Using em and % Units
✅ This sets the bottom border width based on the element’s font size.
5. Example – Using border-bottom Shorthand
Instead of setting border-bottom-width separately, you can use the border-bottom shorthand:
✅ This is equivalent to:
6. Best Practices
✔ Always define border-bottom-style (e.g., solid, dashed, dotted), or the border won't appear.
✔ Use px, em, or rem for precise control over border thickness.
✔ Use the border-bottom shorthand for cleaner, more efficient CSS.

