The inset-inline property sets offsets along the inline axis using logical CSS. It is the inline-axis counterpart to physical left and right properties.
01
Inline Axis
Logical offset.
02
auto
Default value.
03
Shorthand
Start & end.
04
RTL
Adapts direction.
05
absolute
Common use.
06
inset
Related set.
Fundamentals
Introduction
The inset-inline property in CSS is a logical property that controls the inline-start and inline-end offsets of a positioned element in one declaration.
It is part of the CSS Logical Properties and Values module, which provides layout properties that work independently of physical directions and adapt to different writing modes and text directions.
Definition and Usage
Apply inset-inline on positioned elements when you want to offset them along the inline axis. In normal horizontal English pages, that usually means left and right offsets.
💡
Beginner Tip
Think of inset-inline as logical left + right. Pair it with inset-block for full logical positioning.
Foundation
📝 Syntax
The syntax for the inset-inline property accepts one or two values:
Support zoom on mobile — Fixed inline offsets should not clip important text.
Set dir on the document — Correct text direction helps both layout and assistive technology.
🧠 How inset-inline Works
1
Direction defines the inline axis
LTR, RTL, or vertical writing mode determines which physical direction inline-start and inline-end map to.
Text direction
2
inset-inline sets two offsets
One declaration controls both inline-start and inline-end distances for a positioned element.
CSS rule
3
The browser places the element
The box is offset from the containing block along the inline axis.
Layout
=
↔
Logical inline positioning
Layouts adapt cleanly when text direction or writing mode changes.
Compatibility
🖥 Browser Compatibility
The inset-inline 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 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 property94% supported
Bottom line: Safe for modern logical layouts. Use physical left and right only when legacy support is required.
Wrap Up
🎉 Conclusion
The inset-inline property is a valuable addition to CSS, providing flexible control over inline-axis positioning in different writing modes and text directions. It pairs naturally with inset-block and other logical properties for internationalized layouts.
For beginners, start with horizontal LTR pages where it behaves like left and right, then explore RTL direction to see the real advantage of logical CSS.
Use with logical sizing properties like inline-size
Pair with inset-block for full logical placement
Test in RTL and vertical writing modes
Use inset-inline: 0 for full inline-axis stretch
Set a non-static position value first
❌ 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
Summary
Key Takeaways
Knowledge Unlocked
Five things to remember about inset-inline
Use these points when building logical positioned layouts.
5
Core concepts
↔01
Inline Axis
Logical offset.
Purpose
auto02
Default auto
Browser pick.
Default
2 vals03
Start & end
Shorthand.
Syntax
RTL04
Direction
Adapts axis.
Pattern
inset05
Related
Logical set.
Family
❓ Frequently Asked Questions
inset-inline is a logical shorthand that sets inset-inline-start and inset-inline-end offsets along the inline axis of an element.
The default is auto, which lets the browser determine inline-axis placement from other positioning rules.
In horizontal LTR writing mode they often match left and right, but inset-inline follows the inline axis and adapts when direction or writing mode changes.
No. Like inset, it only affects elements with position set to relative, absolute, fixed, or sticky.