A width of 0 draws nothing, even with a solid style and a color. Use a positive length or a keyword when you want a line.
keywords
thin, medium, and thick vary by browser
Those keywords are not fixed pixel sizes. Prefer a length such as 2px when you need a consistent thickness across browsers.
axis
Block is not always top and bottom
With writing-mode: vertical-rl, block sides map to the physical right and left. Use logical properties when layout must follow text flow.
negative
Negative lengths are invalid
A negative width is ignored. Use 0 or a positive length only.
Compatibility
Browser Support
border-block-width is a browser style property from CSS Logical Properties. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available since 2021
border-block-width
Chrome 87+, Firefox 66+, Safari 14.1+, Edge 87+, Opera 73+. Internet Explorer has no support.
97%global support
Google Chrome87+
Full support
Mozilla Firefox66+
Full support
Apple Safari14.1+
Full support
Microsoft Edge87+
Full support
Opera73+
Full support
Samsung Internet14.0+
Full support
Internet ExplorerNo
No support
border-block-widthWidely supported
Bottom line: Safe in current browsers. For older Internet Explorer, fall back to physical properties such as border-top-width and border-bottom-width.
Remember
Key Takeaways
Role: set the thickness of the logical block-start and block-end borders.
One or two values: one sets both sides; two set start, then end.
Needs a style: width alone is invisible until border-block-style is visible.
Initial value:medium. Prefer lengths when you need a fixed size.
One line:border-block-width controls how thick the block-axis borders are in a writing-mode-aware way.
Frequently Asked Questions
It sets the thickness of the logical block-start and block-end borders. In horizontal-tb writing, that is usually the top and bottom borders. The physical edges change with writing-mode, direction, and text-orientation.
The initial value is medium for both sides. The exact pixel size of medium is browser-defined, often around 3px.
Yes. One value sets both block-start and block-end. Two values set block-start first, then block-end. Example: 2px 8px.
Width alone is not enough. You need a visible border-block-style such as solid. A width of 0 also draws no border.
border-top-width always targets the physical top edge. border-block-width follows the block axis, so in vertical writing it can land on the left or right edges instead.
Chrome 87+, Firefox 66+, Safari 14.1+, Edge 87+, and Opera 73+. Internet Explorer does not support it. It is a browser style property, not a Node.js feature.