The inset-block-start property controls the offset of an element’s block-start edge using logical CSS. In horizontal English pages, that usually means the top edge.
01
Block-Start
Logical edge.
02
auto
Default value.
03
Longhand
One side only.
04
Writing Mode
Adapts axis.
05
absolute
Common use.
06
inset-block
Shorthand pair.
Fundamentals
Introduction
The inset-block-start property in CSS is part of the Logical Properties and Values module. It defines the logical block-start offset of an element, which corresponds to the start of the block direction in the document’s writing mode.
This property is especially useful for internationalization and responsive design, because it adapts to different writing modes such as left-to-right, right-to-left, and vertical text layouts.
Definition and Usage
Apply inset-block-start on positioned elements when you need to offset or anchor the block-start side only. Use it to pin headers, badges, labels, or any UI element to the logical start of the block axis.
💡
Beginner Tip
Think of inset-block-start as logical top in horizontal writing mode. Pair it with inset-block-end or use the inset-block shorthand when you need both block edges.
Foundation
📝 Syntax
The syntax for the inset-block-start property accepts a single value:
The default value of the inset-block-start property is auto, which means the browser determines the block-start offset from other positioning rules.
Syntax Rules
Longhand for the block-start side of the inset-block shorthand.
Only works when position is not static.
The property is not inherited.
Accepts length, percentage, and auto values.
In horizontal writing mode, maps to top.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
auto
Applies to
Positioned elements
Inherited
No
Animatable
Yes, as a length
Horizontal writing mode
Behaves like top
Reference
💎 Property Values
Value
Description
length
A fixed offset such as 20px, 1em, or 1rem.
percentage
An offset relative to the containing block size on the block axis.
auto
Lets the browser calculate the block-start offset automatically.
Logical Layout
Block-Start and Writing Modes
Logical inset properties follow the document’s writing mode instead of fixed physical directions:
Horizontal mode (writing-mode: horizontal-tb) — block-start is usually the physical top edge.
Vertical mode (writing-mode: vertical-rl) — block-start follows the rotated block axis, not necessarily the top of the screen.
Related longhands — inset-block-end controls the opposite block edge; inset-block sets both in one rule.
🔄
When to Use the Longhand
Use inset-block-start alone when only the block-start edge needs a fixed offset. Use inset-block when both block-start and block-end should be set together.
Preview
👀 Live Preview
An absolutely positioned box with inset-block-start: 20px in horizontal writing mode:
Hands-On
Examples Gallery
Offset from the block-start edge, anchor a header bar, stretch with block-end, and see behavior in vertical writing mode.
🔢 Block-Start Offsets
Start with a fixed block-start offset and anchor UI to the logical start of the container.
Example 1 — 20px Block-Start Offset
Place a box 20px from the block-start edge of a positioned container.
Logical properties follow the block axis, not fixed top directions, so the same rule works across writing modes.
A11y
♿ Accessibility
Positioning does not change reading order — DOM order still matters for screen readers.
Test vertical and RTL layouts — Logical offsets should not hide essential content.
Avoid covering focusable controls — Top bars and overlays can block keyboard access.
Support zoom on mobile — Fixed block-start offsets should not clip important text.
Announce overlays properly — Use appropriate ARIA roles for modal and toast UI pinned to block-start.
🧠 How inset-block-start Works
1
Writing mode defines block-start
Horizontal or vertical text flow determines which physical direction block-start maps to.
Writing mode
2
inset-block-start sets one offset
You specify the distance from the containing block’s block-start edge to the element’s block-start edge.
CSS rule
3
The browser places the element
The box is positioned along the block axis while other inset values remain at their defaults.
Layout
=
↑
Logical block-start positioning
Headers, badges, and labels stay on the correct logical edge when writing mode changes.
Compatibility
🖥 Browser Compatibility
The inset-block-start property is supported in modern browsers including Chrome 87+, Firefox 63+, Safari 14.1+, and Edge 87+.
✓ Baseline · Modern browsers
Logical positioning in today’s browsers
All major browsers support inset-block-start as part of the CSS Logical Properties module.
94%Modern browser support
Google Chrome87+ · Desktop & Mobile
Full support
Mozilla Firefox63+ · Desktop & Mobile
Full support
Apple Safari14.1+ · macOS & iOS
Full support
Microsoft Edge87+ · Chromium
Full support
Opera73+ · Modern versions
Full support
inset-block-start property94% supported
Bottom line: Safe for modern logical layouts. Use physical top only when legacy support is required.
Wrap Up
🎉 Conclusion
The inset-block-start property is a powerful tool for web developers who want layouts that adapt to different writing modes and responsive designs. By using logical properties like this one, you can keep positioning consistent and flexible across languages and screen sizes.
For beginners, start with horizontal pages where it behaves like top, then explore vertical writing modes to see the real advantage of logical CSS.