CSS inset-block-end Property

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

What You’ll Learn

The inset-block-end property controls the offset of an element’s block-end edge using logical CSS. In horizontal English pages, that usually means the bottom edge.

01

Block-End

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-end property in CSS is a logical property that lets you control the offset of an element’s block-end edge in a flow-relative manner.

It is part of the Logical Properties and Values specification, which helps you write CSS that adapts to different writing modes such as left-to-right, right-to-left, and vertical text layouts.

Definition and Usage

Apply inset-block-end on positioned elements when you need to offset or anchor the block-end side only. Use it to pin footers, toolbars, badges, or any UI element to the logical end of the block axis.

💡
Beginner Tip

Think of inset-block-end as logical bottom in horizontal writing mode. Pair it with inset-block-start or use the inset-block shorthand when you need both block edges.

📝 Syntax

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

syntax.css
element {
  inset-block-end: value;
}

Basic Example

inset-block-end-basic.css
.box {
  position: absolute;
  inset-block-end: 20px;
  inline-size: 100px;
}
inset-block-end: auto; inset-block-end: 20px; inset-block-end: 1rem; inset-block-end: 0;

Default Value

The default value of the inset-block-end property is auto, which means the browser determines the block-end offset from other positioning rules.

Syntax Rules

  • Longhand for the block-end 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 bottom.

⚡ Quick Reference

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

💎 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-end offset automatically.

Block-End and Writing Modes

Logical inset properties follow the document’s writing mode instead of fixed physical directions:

  • Horizontal mode (writing-mode: horizontal-tb) — block-end is usually the physical bottom edge.
  • Vertical mode (writing-mode: vertical-rl) — block-end follows the rotated block axis, not necessarily the bottom of the screen.
  • Related longhandsinset-block-start controls the opposite block edge; inset-block sets both in one rule.
🔄
When to Use the Longhand

Use inset-block-end alone when only the block-end 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-end: 20px in horizontal writing mode:

Examples Gallery

Offset from the block-end edge, anchor a footer bar, stretch with block-start, and see behavior in vertical writing mode.

🔢 Block-End Offsets

Start with a fixed block-end offset and anchor UI to the logical end of the container.

Example 1 — 20px Block-End Offset

Place a box 20px from the block-end edge of a positioned container.

inset-block-end-offset.css
.box {
  position: absolute;
  inset-inline-start: 1rem;
  inset-block-end: 20px;
  inline-size: 100px;
}
Try It Yourself

How It Works

In horizontal writing mode, the box sits 20px above the bottom of its containing block.

Example 2 — Anchor to Block-End

Pin a footer bar flush to the block-end edge with inset-block-end: 0.

inset-block-end-zero.css
.footer-bar {
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 2.5rem;
}
Try It Yourself

How It Works

inset-block-end: 0 anchors the element to the block-end edge, which is a common pattern for sticky footers and action bars inside cards.

📈 Stretch & Writing Modes

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

Example 3 — With inset-block-start

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

inset-block-end-stretch.css
.panel {
  position: absolute;
  inset-inline-end: 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-end still controls the block-end edge when text flows vertically.

inset-block-end-vertical.css
.container {
  writing-mode: vertical-rl;
  position: relative;
}

.box {
  position: absolute;
  inset-block-end: 16px;
}
Try It Yourself

How It Works

Logical properties follow the block axis, not fixed bottom 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 — Bottom bars and overlays can block keyboard access.
  • Support zoom on mobile — Fixed block-end offsets should not clip important text.
  • Announce overlays properly — Use appropriate ARIA roles for modal and toast UI pinned to block-end.

🧠 How inset-block-end Works

1

Writing mode defines block-end

Horizontal or vertical text flow determines which physical direction block-end maps to.

Writing mode
2

inset-block-end sets one offset

You specify the distance from the containing block’s block-end edge to the element’s block-end 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-end positioning

Footers, badges, and toolbars stay on the correct logical edge when writing mode changes.

🖥 Browser Compatibility

The inset-block-end 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-end 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-end property 94% supported

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

🎉 Conclusion

The inset-block-end property is a useful tool for web developers who want layouts that adapt to different writing modes. By using this logical property, you can anchor UI to the block-end edge in a way that stays correct when text direction or writing mode changes.

For beginners, start with horizontal pages where it behaves like bottom, then explore vertical writing modes to see the real advantage of logical CSS.

💡 Best Practices

✅ Do

  • Use for footers, toolbars, and badges pinned to block-end
  • Pair with inset-block-start 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-end

Use these points when anchoring elements to the logical block-end 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-end sets the offset of an element's block-end edge along the block axis, relative to its containing block.
The default is auto, which lets the browser determine block-end placement from other positioning rules.
In horizontal writing mode they often match, but inset-block-end 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-end is not inherited.

Practice in the Live Editor

Open the HTML editor, set inset-block-end 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