The border-block-width property sets how thick the block-start and block-end borders are on an element. In horizontal writing, that usually means the top and bottom border widths.
01
Block Widths
Start and end edges.
02
One Value
Same on both sides.
03
Two Values
Start vs end width.
04
thin / medium / thick
Keyword sizes.
05
px / em / rem
Exact length units.
06
Writing Modes
Adapts to text flow.
Fundamentals
Definition and Usage
The border-block-width property is a shorthand that sets the width of the borders on the block-start and block-end sides of an element. In horizontal writing, block usually refers to the top and bottom borders.
This property is part of CSS Logical Properties. You can use one value for both sides or two values when block-start and block-end need different thicknesses.
💡
Beginner Tip
border-block-width only sets thickness. Add border-block-style: solid; and border-block-color: black; so the border is visible, or use border-block: 5px solid black; as shorthand.
Foundation
📝 Syntax
The syntax for border-block-width accepts one or two keyword or length values:
syntax.css
selector{border-block-width:<length> | thin | medium | thick | <length> <length>;}
The default value of border-block-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-block-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
Block Width and Writing Modes
Block-start and block-end follow the block axis, so the same width rule adapts when writing mode changes.
Horizontal writing
5px block-start and block-end border widths
Vertical writing (vertical-rl)
Logical block border widths
Compare
border-block-width vs border-top-width / border-bottom-width
Property
Targets
Best for
border-block-width
Logical block-start and block-end border thickness
Multilingual and writing-mode-aware layouts
border-top-width / border-bottom-width
Physical top and bottom border thickness
Simple horizontal pages with fixed top and bottom borders
border-block
Width, style, and color together on both block sides
When you want one shorthand for full block borders
Preview
👀 Live Preview
A box with 5px block-start and block-end border widths:
This element has a 5px block border width on both block sides.
Uses border-block-width: 5px; with solid style and dark color.
Hands-On
Examples Gallery
Try border-block-width with two-value lengths, one value, keyword sizes, and vertical writing mode.
📚 Basic Block Widths
Set block-start and block-end border widths with style and color longhands so the lines are visible.
Example 1 — Different Block-Start and Block-End Widths
Set different border widths for the block-start and block-end edges of a div element.
border-block-width-two-value.html
<style>div{border-block-width:5px 10px;border-block-style:solid;border-block-color:blue;padding-block:0.75rem;}</style><div>
This div has a 5px block-start border and a 10px block-end border.
</div>
With vertical writing, block-start and block-end move with the block axis. The same width values still apply to the correct logical edges.
🧠 How border-block-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-block-style and border-block-color.
Border setup
3
The browser draws both block sides
Block-start and block-end use your width values based on the current writing mode.
Logical mapping
=
─
Sized block borders
Your element gets clear separators with the thickness you chose on both logical block edges.
Compatibility
Universal Browser Support
border-block-width is supported in all modern browsers. Internet Explorer does not support logical border properties.
✓ Baseline · Modern browsers
Logical border widths in today’s browsers
Chrome, Firefox, Safari, Edge, and Opera support border-block-width in current versions.
96%Modern browser 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
Fallback behavior
For older browsers, use border-top-width and border-bottom-width as physical fallbacks in horizontal layouts.
💻
Internet ExplorerNo support · Use border-top-width and border-bottom-width instead
None
border-block-width property96% supported
Bottom line: Use border-block-width confidently in modern logical layout systems.
Wrap Up
Conclusion
The border-block-width property is a powerful tool for controlling border thickness on block-start and block-end sides, especially when content flow may change across languages or writing modes. By using logical properties like this, you can create responsive and adaptable designs that work across various languages and writing directions.
Use one value for matching block-start and block-end widths
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-block shorthand when setting all three parts
Test block border widths in vertical writing mode when needed
❌ Don’t
Set width alone and forget a visible border style
Assume block-start always equals physical top
Use very thick borders everywhere in minimal UI designs
Mix physical and logical width properties without a reason
Rely on medium when you need exact pixel control
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about border-block-width
Use these points when sizing logical block borders on both sides.
5
Core concepts
─01
Block Widths
Both block sides.
Purpose
⚙️02
medium Default
Browser default size.
Default
📏03
thin / thick
Quick keywords.
Values
📝04
px / em / rem
Exact lengths.
Units
🔄05
Writing Mode
Adapts to flow.
Context
❓ Frequently Asked Questions
The border-block-width property sets the thickness of borders on the block-start and block-end sides of an element. In horizontal writing, those are usually the top and bottom border widths.
The initial value is medium, which is typically around 3 pixels depending on the browser.
Yes. With one value, both block-start and block-end use the same width. With two values, the first applies to block-start and the second to block-end.
Width alone does not always show a border. You also need a visible border-block-style such as solid and usually border-block-color, or use the border-block shorthand.
Physical top and bottom width properties always target fixed edges. border-block-width follows the writing mode and stays on the logical block-start and block-end sides.