margin-inline

A logical shorthand for 'margin-inline-start' and 'margin-inline-end'. It sets the horizontal spacing (left and right) in one line.

It is documented as part of the CSS Logical Properties and Values specification.

/* Usage Example */
.button {
  /* Adds 1rem space to both left and right logically */
  margin-inline: 1rem;
}

/* Syntax */
margin-inline: margin-top;

/* Global values */
margin-inline: inherit;
margin-inline: initial;
margin-inline: revert;
margin-inline: revert-layer;
margin-inline: unset;
Widely available Since 2021 95% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.

87+
66+
14.1+
87+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC