CSS inset-block-start Property

Beginner
5 min read
Updated: Oct 2026
3 examples
Live preview

Definition and Usage

The inset-block-start property sets the logical block-start offset of a positioned element. In the default horizontal writing mode, that usually means the same edge as top.

With writing-mode: vertical-rl, the same value maps to a different physical side (often right). It has no effect on static elements. Pair it with inset-block-end, or set both via inset-block.

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.

CSS Syntax

syntax.css
inset-block-start: <length> | <percentage> | auto | initial | inherit;

The initial value is auto. The property is not inherited. Percentages refer to the containing block’s size on the block axis.

Property Values

ValueDescriptionTry it
<length>Fixed distance from the block-start edgeTry it
<percentage>Percent of the containing block’s block sizeTry it
With writing-modePhysical edge changes when writing mode is verticalTry it
Needs positionWithout a positioned value, the property does nothingTry it
initialResets to autoTry it
inheritUses the parent’s inset-block-start valueTry it

How to Use inset-block-start

Position the element, then offset it from the block-start edge.

  1. Create a containing block if needed (position: relative on the parent).
  2. Set the child to position: absolute (or another non-static value).
  3. Add inset-block-start with a length or percentage.
  4. Optionally change writing-mode to see which physical edge moves.
PieceRequired?Role
position ≠ staticYesWithout it, inset-block-start is ignored
Length or %Yes (to see an offset)Distance from the logical block-start edge
writing-modeOptionalChooses which physical edge is block-start
End sideSeparateUse inset-block-end or the inset-block shorthand

Live Preview

The blue box is position: absolute. Change only inset-block-start. In horizontal text this acts like top.

Larger values pull the box farther from the block-start edge (downward in horizontal text).

Box

inset-block-start: 20px

CSS Examples

Each snippet focuses on inset-block-start. Position is required so the offset applies. Use Try It Yourself for a live editor.

Example 1 — Offset with a Length

In horizontal text, 20px acts like top: 20px.

CSS
<style>
  .stage { position: relative; height: 140px; border: 1px dashed #94a3b8; }
  .box {
    position: absolute;
    left: 16px;
    width: 120px;
    inset-block-start: 20px;
    background: #2563eb;
    color: #fff;
    padding: 8px;
  }
</style>

<div class="stage">
  <div class="box">start: 20px</div>
</div>
Try It Yourself

How It Works

  1. Position the child. absolute inside a relative stage.
  2. Set the start offset. inset-block-start: 20px distances the box from block-start.
  3. Map in horizontal mode. Block-start is the top edge here.
  4. Leave end alone. Without an end inset, height comes from content.

Example 2 — Percentage Offset

Percentages are relative to the containing block’s block size.

CSS
<style>
  .stage { position: relative; height: 140px; border: 1px dashed #94a3b8; }
  .box {
    position: absolute;
    left: 16px;
    width: 120px;
    inset-block-start: 20%;
    background: #2563eb;
    color: #fff;
    padding: 8px;
  }
</style>

<div class="stage">
  <div class="box">start: 20%</div>
</div>
Try It Yourself

How It Works

  1. Keep absolute positioning. Same stage pattern as before.
  2. Use a percentage. 20% is of the stage’s block size (height here).
  3. Scale with the container. Taller stages increase the gap from the start edge.
  4. Still logical. The percentage tracks the block axis, not a fixed physical side forever.

Example 3 — Vertical Writing Mode

With vertical-rl, block-start is no longer the top edge.

CSS
<style>
  .stage {
    position: relative;
    height: 160px;
    border: 1px dashed #94a3b8;
    writing-mode: vertical-rl;
  }
  .box {
    position: absolute;
    inset-inline-start: 12px;
    inset-block-start: 20px;
    background: #2563eb;
    color: #fff;
    padding: 8px;
  }
</style>

<div class="stage">
  <div class="box">Follows block-start</div>
</div>
Try It Yourself

How It Works

  1. Switch writing mode. vertical-rl rotates the block axis.
  2. Keep the logical property. inset-block-start still means “from the start of the block axis.”
  3. Physical edge changes. The offset no longer sits on the top like top would.
  4. Why logical helps. One rule stays correct across writing modes.

Edge Cases & Pitfalls

If the offset looks wrong, check these first.

position

Static elements ignore inset-block-start

Set position to relative, absolute, fixed, or sticky first.

top

Not always the same as top

top is physical. Prefer inset-block-start when the start edge must follow writing mode.

shorthand

inset-block can overwrite it

A later inset-block declaration sets both start and end. Put the longhand after the shorthand if you need only the start side.

mode

Writing mode changes the physical edge

Do not assume “always top.” Check writing-mode in vertical layouts.

auto

auto means no forced start offset

With auto, placement comes from other rules (such as a set end offset plus height, or static position).

Browser Support

inset-block-start is a browser CSS property for logical positioned offsets. Node.js, Deno, and Bun do not apply it.

✓ Baseline · Widely available

inset-block-start

Chrome 87+, Edge 87+, Firefox 63+, Safari 14.1+. Internet Explorer has no support — fall back to top (or the matching physical side in vertical modes).

96% Modern browser support
Google Chrome 87+
Full support
Mozilla Firefox 63+
Full support
Apple Safari 14.1+
Full support
Microsoft Edge 87+
Full support
Opera 73+
Full support
Samsung Internet 14+
Full support
Internet Explorer No support
Not supported
inset-block-start Widely supported

Bottom line: Safe for modern sites. For Internet Explorer, use top (or the physical edge that matches your writing mode). It is not a runtime API.

Key Takeaways

  • Role: offset a positioned box from the logical block-start edge.
  • Needs position: relative, absolute, fixed, or sticky.
  • Often like top: in horizontal-tb, then adapts with writing mode.
  • Initial value: auto. Not inherited.

One line: positioned box + inset-block-start: 20px; = logical start offset that follows writing mode.

Frequently Asked Questions

It sets the logical block-start offset of a positioned element. In horizontal writing mode that usually matches top.
The initial value is auto. The browser then places the block-start edge from other positioning rules.
top always targets the physical top edge. inset-block-start follows writing-mode, so in vertical-rl it can map to a side edge instead.
No. It only affects elements with position set to relative, absolute, fixed, or sticky.
inset-block is the shorthand that sets both inset-block-start and inset-block-end. Use inset-block-start when you only need the start side.
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.

Next: inset-inline

Set both logical inline-start and inline-end offsets together.

inset-inline tutorial →

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.

8 people found this page helpful