margin-block-start

A logical property that sets the margin at the 'start' of the block axis (usually the 'top' in English). It's the logical replacement for 'margin-top'.

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

/* Usage Example */
article {
  /* Adds space at the top in a logical way */
  margin-block-start: 3rem;
}

/* Syntax */
margin-block-start: top;

/* Global values */
margin-block-start: inherit;
margin-block-start: initial;
margin-block-start: revert;
margin-block-start: revert-layer;
margin-block-start: 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.

69+
41+
12.1+
79+
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