CSS inset-block-start Property

Beginner
⏱️ 5 min read
📚 Updated: Jun 2026
🎯 4 Examples
Layout & Positioning

What You’ll Learn

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.

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.

📝 Syntax

The syntax for the inset-block-start property accepts a single value:

syntax.css
element {

  inset-block-start: value;

}

Basic Example

inset-block-start-basic.css
.box {

  position: absolute;

  inset-block-start: 20px;

  inset-inline-start: 30px;

  inline-size: 100px;

}
inset-block-start: auto; inset-block-start: 20px; inset-block-start: 1rem; inset-block-start: 0;

Default 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.

⚡ Quick Reference

QuestionAnswer
Initial valueauto
Applies toPositioned elements
InheritedNo
AnimatableYes, as a length
Horizontal writing modeBehaves like top

💎 Property Values

ValueDescription
lengthA fixed offset such as 20px, 1em, or 1rem.
percentageAn offset relative to the containing block size on the block axis.
autoLets the browser calculate the block-start offset automatically.

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 longhandsinset-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.

👀 Live Preview

An absolutely positioned box with inset-block-start: 20px in horizontal writing mode:

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.

inset-block-start-offset.css
.box {

  position: absolute;

  inset-block-start: 20px;

  inset-inline-start: 1rem;

  inline-size: 100px;

}
Try It Yourself

How It Works

In horizontal writing mode, the box sits 20px below the top of its containing block.

Example 2 — Anchor to Block-Start

Pin a header bar flush to the block-start edge with inset-block-start: 0.

inset-block-start-zero.css
.header-bar {

  position: absolute;

  inset-inline: 0;

  inset-block-start: 0;

  block-size: 2.5rem;

}
Try It Yourself

How It Works

inset-block-start: 0 anchors the element to the block-start edge, which is a common pattern for card headers and sticky top bars.

📈 Stretch & Writing Modes

Combine block-start and block-end offsets, then test logical behavior in vertical writing mode.

Example 3 — With inset-block-end

Set both block edges to stretch a panel along the block axis.

inset-block-start-stretch.css
.panel {

  position: absolute;

  inset-inline-start: 1rem;

  inset-block-start: 1rem;

  inset-block-end: 1rem;

  inline-size: 5rem;

}
Try It Yourself

How It Works

When both block edges are set, the element stretches between them. This is equivalent to inset-block: 1rem.

Example 4 — Vertical Writing Mode

See how inset-block-start still controls the block-start edge when text flows vertically.

inset-block-start-vertical.css
.container {

  writing-mode: vertical-rl;

  position: relative;

}



.box {

  position: absolute;

  inset-block-start: 16px;

}
Try It Yourself

How It Works

Logical properties follow the block axis, not fixed top directions, so the same rule works across writing modes.

♿ 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.

🖥 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 Chrome 87+ · Desktop & Mobile
Full support
Mozilla Firefox 63+ · Desktop & Mobile
Full support
Apple Safari 14.1+ · macOS & iOS
Full support
Microsoft Edge 87+ · Chromium
Full support
Opera 73+ · Modern versions
Full support
inset-block-start property 94% supported

Bottom line: Safe for modern logical layouts. Use physical top only when legacy support is required.

🎉 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.

💡 Best Practices

✅ Do

  • Use for headers, badges, and labels pinned to block-start
  • Pair with inset-block-end when stretching along the block axis
  • Test in RTL and vertical writing modes
  • Set a non-static position value first
  • Prefer logical properties in internationalized layouts

❌ Don’t

  • Apply without positioning context
  • Mix logical and physical offsets without reason
  • Assume it works like margin or padding
  • Hide critical content with absolute overlays
  • Forget containing block setup for absolute children

Key Takeaways

Knowledge Unlocked

Five things to remember about inset-block-start

Use these points when anchoring elements to the logical block-start edge.

5
Core concepts
auto 02

Default auto

Browser pick.

Default
1 val 03

Longhand

One side.

Syntax
mode 04

Writing mode

Adapts axis.

Pattern
block 05

inset-block

Shorthand.

Family

❓ Frequently Asked Questions

inset-block-start sets the offset of an element's block-start edge along the block axis, relative to its containing block.
The default is auto, which lets the browser determine block-start placement from other positioning rules.
In horizontal writing mode they often match, but inset-block-start follows the logical block axis and adapts when writing mode changes.
No. Like inset and inset-block, it only affects elements with position set to relative, absolute, fixed, or sticky.
No. inset-block-start is not inherited.

Practice in the Live Editor

Open the HTML editor, set inset-block-start on positioned elements, and compare horizontal versus vertical writing modes.

HTML Editor →

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

5 people found this page helpful