The inset-inline-end property controls the offset of an element’s inline-end edge using logical CSS. In horizontal LTR pages, that usually means the right edge.
01
Inline-End
Logical edge.
02
auto
Default value.
03
Longhand
One side only.
04
RTL
Adapts direction.
05
absolute
Common use.
06
inset-inline
Shorthand pair.
Fundamentals
Introduction
The inset-inline-end property in CSS is a logical property that defines the offset of an element’s inline-end edge within its containing block. Logical properties are writing-mode and direction-aware, so they adapt to LTR, RTL, and other layout contexts.
It is part of the CSS Logical Properties and Values specification, which helps you build layouts that work across languages and text directions without rewriting positioning rules.
Definition and Usage
Apply inset-inline-end on positioned elements when you need to offset or anchor the inline-end side only. Use it for badges, side panels, close buttons, or any UI pinned to the logical end of the inline axis.
💡
Beginner Tip
Think of inset-inline-end as logical right in horizontal LTR writing mode. Pair it with inset-inline-start or use the inset-inline shorthand when you need both inline edges.
Foundation
📝 Syntax
The syntax for the inset-inline-end property accepts a single value:
The default value of the inset-inline-end property is auto, which means the browser determines the inline-end offset from other positioning rules.
Syntax Rules
Longhand for the inline-end side of the inset-inline shorthand.
Only works when position is not static.
The property is not inherited.
Accepts length, percentage, and auto values.
In horizontal LTR writing mode, maps to right.
Cheat Sheet
⚡ Quick Reference
Question
Answer
Initial value
auto
Applies to
Positioned elements
Inherited
No
Animatable
Yes, as a length
Horizontal LTR writing mode
Behaves like right
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 inline axis.
auto
Lets the browser calculate the inline-end offset automatically.
Logical Layout
Inline-End and Text Direction
Logical inset properties follow the document’s direction instead of fixed physical sides:
Horizontal LTR (dir="ltr") — inline-end is usually the physical right edge.
Horizontal RTL (dir="rtl") — inline-end moves to the opposite side, but the same CSS rule still works.
Related longhands — inset-inline-start controls the opposite inline edge; inset-inline sets both in one rule.
🔄
When to Use the Longhand
Use inset-inline-end alone when only the inline-end edge needs a fixed offset. Use inset-inline when both inline-start and inline-end should be set together.
Preview
👀 Live Preview
An absolutely positioned box with inset-inline-end: 20px in horizontal LTR writing mode:
Hands-On
Examples Gallery
Offset from the inline-end edge, anchor a side panel, stretch with inline-start, and see behavior in RTL direction.
🔢 Inline-End Offsets
Start with a fixed inline-end offset and anchor UI to the logical end of the container.
Example 1 — 20px Inline-End Offset
Place a badge 20px from the inline-end edge of a positioned container.
Logical properties follow the inline axis, not fixed right directions, so the same rule works in both LTR and RTL layouts.
A11y
♿ Accessibility
Positioning does not change reading order — DOM order still matters for screen readers.
Test RTL layouts — Logical offsets should not hide essential content.
Avoid covering focusable controls — Side panels and overlays can block keyboard access.
Support zoom on mobile — Fixed inline-end offsets should not clip important text.
Set dir on the document — Correct text direction helps both layout and assistive technology.
🧠 How inset-inline-end Works
1
Direction defines inline-end
LTR or RTL text flow determines which physical direction inline-end maps to.
Text direction
2
inset-inline-end sets one offset
You specify the distance from the containing block’s inline-end edge to the element’s inline-end edge.
CSS rule
3
The browser places the element
The box is positioned along the inline axis while other inset values remain at their defaults.
Layout
=
→
Logical inline-end positioning
Badges, panels, and controls stay on the correct logical edge when text direction changes.
Compatibility
🖥 Browser Compatibility
The inset-inline-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-inline-end 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-inline-end property94% supported
Bottom line: Safe for modern logical layouts. Use physical right only when legacy support is required.
Wrap Up
🎉 Conclusion
The inset-inline-end property is a useful tool for web developers who want layouts that adapt to different writing modes and text directions. By using logical properties, you can anchor UI to the inline-end edge in a way that stays correct when direction changes.
For beginners, start with horizontal LTR pages where it behaves like right, then explore RTL direction to see the real advantage of logical CSS.