In the default horizontal writing mode that usually means top and bottom. With writing-mode: vertical-rl, the same values map to the physical right and left edges. It only affects positioned elements. For the other axis, use inset-inline. Physical four-side shorthand is inset.
Baseline · Widely available.
Not deprecated and not experimental. Logical inset properties have been widely available across browsers since April 2021. Internet Explorer does not support them.
Syntax
CSS Syntax
syntax.css
inset-block:<length> | <percentage> | auto | initial | inherit;
One value sets start and end the same. Two values set start first and end second. Each longhand starts as auto. The property is not inherited.
Switch writing mode.vertical-rl turns the block axis sideways.
Keep the same logical rule.inset-block still means start and end on the block axis.
Physical edges change. Those offsets now land on right and left.
Why logical helps. One rule works in horizontal and vertical layouts.
Edge Cases & Pitfalls
If the offsets look wrong, check these first.
position
Static elements ignore inset-block
Set position to relative, absolute, fixed, or sticky first.
axis
Only the block axis
This property never sets left/right in horizontal text. Use inset-inline for the inline axis, or inset for all four physical sides.
order
Two values are start then end
inset-block: 8px 32px means 8px on block-start and 32px on block-end. Swap them if the wrong edge looks wrong.
mode
Writing mode changes the physical edges
Do not assume “always top and bottom.” Check writing-mode when the layout is vertical.
physical
inset is physical; this is logical
inset always maps to top/right/bottom/left. Prefer inset-block when the block axis should follow writing mode.
Compatibility
Browser Support
inset-block is a browser CSS property for logical positioned offsets. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
inset-block
Chrome 87+, Edge 87+, Firefox 63+, Safari 14.1+. Internet Explorer has no support — fall back to top/bottom (or left/right in vertical modes).
96%Modern browser support
Google Chrome87+
Full support
Mozilla Firefox63+
Full support
Apple Safari14.1+
Full support
Microsoft Edge87+
Full support
Opera73+
Full support
Samsung Internet14+
Full support
Internet ExplorerNo support
Not supported
inset-blockWidely supported
Bottom line: Safe for modern sites. For Internet Explorer, use top and bottom (or the matching physical pair). It is not a runtime API.
Remember
Key Takeaways
Role: set logical block-start and block-end offsets together.
Needs position: relative, absolute, fixed, or sticky.
One or two values: one for both sides; two for start then end.
Follows writing mode: not always top/bottom physically.
One line: positioned box + inset-block: 8px 32px; = logical block offsets that adapt with writing mode.
Frequently Asked Questions
It is a shorthand for inset-block-start and inset-block-end. It sets logical offsets along the block axis of a positioned element.
Each side defaults to auto, the same as the longhands. Placement then follows other positioning rules.
In horizontal-tb writing mode it usually matches top and bottom. When writing-mode is vertical, the same rule maps to the physical left/right edges instead.
No. It only affects elements with position set to relative, absolute, fixed, or sticky.
inset always sets physical top, right, bottom, and left. inset-block only sets the logical block axis and follows writing-mode.
It is Baseline Widely available. Chrome 87+, Edge 87+, Firefox 63+, and Safari 14.1+ support it. Internet Explorer does not. It is a browser CSS property, not a Node.js feature.