Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since April 2021.
* Some parts of this feature may have varying levels of support.
The margin-inline CSS shorthand property defines both the logical inline start and end margins of an element, which maps to physical margins depending on the element's writing mode, directionality, and text orientation.
This property is a shorthand for the following CSS properties:
This property corresponds to the margin-top and margin-bottom, or the margin-right and margin-left properties, depending on the values defined for writing-mode, direction, and text-orientation.
The margin-inline property may be specified using one or two values.
The margin-inline property takes the same values as the margin-top property.
| as each of the properties of the shorthand: |
| same as margin |
| no |
| depends on layout model |
as each of the properties of the shorthand:
|
| a length |
| CSS Logical Properties and Values Module Level 1 # propdef-margin-inline |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Apr 20, 2026 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.