The border-bottom-width property sets how thick the bottom border is on an element. It is useful when you want precise control over divider weight on the bottom edge.
01
Bottom Width
Physical bottom edge.
02
thin / medium / thick
Keyword sizes.
03
px / em / rem
Exact length units.
04
medium Default
Browser default size.
05
Needs Style
Pair with style/color.
06
Longhand
Part of border-bottom.
Fundamentals
Definition and Usage
The border-bottom-width CSS property allows you to specify the thickness of the bottom border of an element. This property is part of the border longhand family and is used to control the width of the border along the bottom edge.
By adjusting this property, you can enhance visual separation between elements and create more defined layouts with subtle 1px dividers or prominent accent lines.
💡
Beginner Tip
border-bottom-width only sets thickness. Add border-bottom-style: solid; and border-bottom-color: black; so the border is visible, or use border-bottom: 5px solid black; as shorthand.
Foundation
📝 Syntax
The syntax for border-bottom-width is straightforward. It accepts keyword values or length units.
syntax.css
selector{border-bottom-width:<length> | thin | medium | thick;}
The value can be a keyword such as thin or a length such as 5px, 0.25em, or 1rem.
Syntax Rules
The initial value is medium, typically around 3 to 4 pixels.
Keywords: thin, medium, and thick.
Length values use units like px, em, or rem.
Pair with border-bottom-style and border-bottom-color for full control.
Use border-bottom shorthand when setting width, style, and color together.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
medium
Applies to
Bottom border width only
Inherited
No
Animatable
Yes, as a length
Common use
Section dividers, footer rules, emphasis lines
Defaults
Default Value
The default value of border-bottom-width is medium, which typically corresponds to a width of around 3 to 4 pixels depending on the browser’s default settings.
Reference
💎 Property Values
The border-bottom-width property accepts keyword values and length units.
Value
Description
thin
A thin border width (typically 1px)
medium
A medium border width (default, typically 3–4px)
thick
A thick border width (typically 5–6px)
<length>
A specific width using a length unit like px, em, or rem
initial
Sets the property to its default value
inherit
Inherits the property value from its parent element
previewthin
previewmedium
previewthick
preview1px
preview4px
preview8px
Scope
Physical Bottom Edge
border-bottom-width always sets the thickness of the visual bottom border, even when writing mode changes. For writing-mode-aware layouts, consider border-block-end-width instead.
Horizontal writing
5px bottom border width
Vertical writing (vertical-rl)
Still on physical bottom
Compare
border-bottom-width vs border-block-end-width
Property
Targets
Best for
border-bottom-width
Physical bottom border thickness
Simple horizontal pages, tabs, lists, and section dividers
border-block-end-width
Logical block-end border thickness
Multilingual and writing-mode-aware layouts
border-bottom
Width, style, and color together
When you want one shorthand for the full bottom border
Preview
👀 Live Preview
A box with a 5px bottom border width:
This element has a 5px bottom border width.
Uses border-bottom-width: 5px; with solid style and black color.
Hands-On
Examples Gallery
Try border-bottom-width with pixel lengths, keyword sizes, width comparisons, and bottom-edge overrides.
📚 Basic Bottom Border Widths
Set the bottom border width with style and color longhands so the line is visible.
Example 1 — 5px Bottom Border Width
Set border-bottom-width to 5px on a paragraph element.
border-bottom-width-5px.html
<style>p{border-bottom-width:5px;border-bottom-style:solid;border-bottom-color:black;padding-bottom:0.75rem;}</style><p>
This paragraph has a bottom border width of 5 pixels.
</p>
This paragraph has a bottom border width of 5 pixels.
How It Works
5px sets an exact thickness on the bottom edge. Style and color longhands make the border visible.
Example 2 — thin Keyword on a Heading
Use the thin keyword with a dashed blue bottom border on an h2.
border-bottom-width-thin.html
<style>h2{border-bottom-width:thin;border-bottom-style:dashed;border-bottom-color:blue;padding-bottom:0.5rem;}</style><h2>This heading has a thin bottom border.</h2>
The border shorthand sets all sides to 1px. border-bottom-width: 4px; then overrides only the bottom thickness for a stronger accent line.
🧠 How border-bottom-width Works
1
You choose a thickness
Set a keyword like thin or a length like 5px.
Width rule
2
You add style and color
Pair the width with border-bottom-style and border-bottom-color.
Border setup
3
The browser draws the bottom edge
Only the physical bottom border uses that thickness. Top, left, and right sides stay unchanged.
Bottom edge
=
─
Sized bottom divider
Your element gets a clear separator with the thickness you chose on the bottom edge.
Compatibility
Universal Browser Support
The border-bottom-width property is supported in all major browsers, including Chrome, Firefox, Safari, Edge, Opera, and Internet Explorer. It is one of the most reliable CSS border properties.
✓ Baseline · All browsers
Reliable bottom border widths on every platform
Chrome, Firefox, Safari, Edge, and Opera all support border-bottom-width consistently.
100%Universal support
Google Chrome69+ · Desktop & Mobile
Full support
Mozilla Firefox66+ · Desktop & Mobile
Full support
Apple Safari12.1+ · macOS & iOS
Full support
Microsoft Edge79+ · Chromium
Full support
Opera56+ · Modern versions
Full support
border-bottom-width property100% supported
Bottom line: Use border-bottom-width freely in any project. It works consistently across all browsers.
Wrap Up
Conclusion
The border-bottom-width property is a useful tool for controlling the thickness of the bottom border of elements. Whether you want a subtle 1px divider or a prominent accent line, adjusting the border width helps you achieve the desired visual effect.
Experiment with keyword values like thin and thick, or use exact lengths such as 2px and 4px to find the best fit for your design needs.
Use 1px or 2px for subtle UI dividers on the bottom edge
Pair width with style and color longhands for predictable results
Use rem when you want thickness to scale with root font size
Use the border-bottom shorthand when setting all three parts
Override only border-bottom-width when other sides use the border shorthand
❌ Don’t
Set width alone and forget a visible border style
Use border-bottom-width when you need a writing-mode-aware logical edge
Use very thick borders everywhere in minimal UI designs
Mix physical and logical width properties without a clear reason
Rely on medium when you need exact pixel control
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-bottom-width
Use these points when sizing the physical bottom edge.
5
Core concepts
─01
Bottom Width
Physical bottom edge.
Purpose
⚙️02
medium Default
Browser default size.
Default
📏03
thin / thick
Quick keywords.
Values
📝04
px / em / rem
Exact lengths.
Units
🔄05
One Edge Only
Other sides unchanged.
Scope
❓ Frequently Asked Questions
The border-bottom-width property sets the thickness of the bottom border of an element. It only affects the physical bottom edge.
The initial value is medium, which is typically around 3 to 4 pixels depending on the browser.
Width alone does not always show a border. You also need a visible border-bottom-style such as solid and usually a color, or use the border-bottom shorthand.
border-bottom-width always sets the physical bottom edge thickness. border-block-end-width follows the writing mode and stays on the logical block-end side.
Length values like 1px, 2px, and 4px are most common in modern UI. Keywords thin, medium, and thick are useful for quick sizing.