The margin-inline-end property sets the logical inline-end margin of an element. It maps to a physical side based on writing-mode and direction.
In horizontal left-to-right layout it usually matches margin-right. In RTL it usually matches margin-left. It is one half of the margin-inline shorthand and is not inherited.
Baseline · Widely available.
Not deprecated. Broad support since about 2020. Prefer it over physical margin-right when direction can change.
Syntax
CSS Syntax
syntax.css
margin-inline-end:<length> | <percentage> | auto | inherit;
Same value types as other margins. Example: margin-inline-end: 1.5rem;.
margin-inline-end is a browser CSS property for logical margins. Node.js, Deno, and Bun do not apply it.
✓ Baseline · Widely available
margin-inline-end
Supported in all modern browsers (broad support from about 2020). Prefer it for direction-aware end margins.
96%Modern browser support
Google Chrome69+
Full support
Mozilla Firefox41+
Full support
Apple Safari12.1+
Full support
Microsoft Edge79+
Full support
Opera56+
Full support
Samsung Internet10+
Full support
Internet ExplorerNo support
No support
margin-inline-endWidely supported
Bottom line: Safe for modern sites. Fall back to margin-right/left only for very old browsers. It is not a runtime API.
Remember
Key Takeaways
Role: outer margin on the logical inline-end side.
Initial:0. Not inherited.
Follows direction — better than margin-right for RTL.
Pair with start via margin-inline when both sides need space.
One line: use margin-inline-end for space after an element that stays correct when text direction changes.
Frequently Asked Questions
It sets the outer margin on the inline-end side of an element. In horizontal left-to-right layout that is usually the right side; in RTL it is usually the left.
The initial value is 0. There is no inline-end margin until you set one.
margin-right always targets the physical right edge. margin-inline-end follows writing mode and direction, so it stays on the logical end side in RTL and vertical layouts.
margin-inline is the shorthand for margin-inline-start and margin-inline-end. Use the longhand when you only need the end side.
No. Set it on each element that needs end-side spacing.
It is Baseline Widely available (broad support since about 2020). It is a browser CSS property, not a Node.js feature.