CSS inset-block-end Property

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

Definition and Usage

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

With writing-mode: vertical-rl, the same value maps to a different physical side (often left). It has no effect on static elements. Pair it with inset-block-start, 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-end: <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-end 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-end valueTry it

How to Use inset-block-end

Position the element, then offset it from the block-end 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-end with a length or percentage.
  4. Optionally change writing-mode to see which physical edge moves.
PieceRequired?Role
position ≠ staticYesWithout it, inset-block-end is ignored
Length or %Yes (to see an offset)Distance from the logical block-end edge
writing-modeOptionalChooses which physical edge is block-end
Start sideSeparateUse inset-block-start or the inset-block shorthand

Live Preview

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

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

Box

inset-block-end: 20px

CSS Examples

Each snippet focuses on inset-block-end. 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 bottom: 20px.

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

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

How It Works

  1. Position the child. absolute inside a relative stage.
  2. Set the end offset. inset-block-end: 20px distances the box from block-end.
  3. Map in horizontal mode. Block-end is the bottom edge here.
  4. Leave start alone. Without a start 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-end: 20%;
    background: #2563eb;
    color: #fff;
    padding: 8px;
  }
</style>

<div class="stage">
  <div class="box">end: 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 end 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-end is no longer the bottom 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-end: 20px;
    background: #2563eb;
    color: #fff;
    padding: 8px;
  }
</style>

<div class="stage">
  <div class="box">Follows block-end</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-end still means “from the end of the block axis.”
  3. Physical edge changes. The offset no longer sits on the bottom like bottom 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-end

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

bottom

Not always the same as bottom

bottom is physical. Prefer inset-block-end when the end 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 end side.

mode

Writing mode changes the physical edge

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

auto

auto means no forced end offset

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

Browser Support

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

✓ Baseline · Widely available

inset-block-end

Chrome 87+, Edge 87+, Firefox 63+, Safari 14.1+. Internet Explorer has no support — fall back to bottom (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-end Widely supported

Bottom line: Safe for modern sites. For Internet Explorer, use bottom (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-end edge.
  • Needs position: relative, absolute, fixed, or sticky.
  • Often like bottom: in horizontal-tb, then adapts with writing mode.
  • Initial value: auto. Not inherited.

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

Frequently Asked Questions

It sets the logical block-end offset of a positioned element. In horizontal writing mode that usually matches bottom.
The initial value is auto. The browser then places the block-end edge from other positioning rules.
bottom always targets the physical bottom edge. inset-block-end 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-end when you only need the end 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-block-start

Set the logical block-start offset on a positioned element.

inset-block-start 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