place-content

A shorthand for setting both 'align-content' and 'justify-content' at once. It controls how the alignment of the entire content block (not individual items) happens within its container.

It is documented as part of the CSS Box Alignment specification.

/* Usage Example */
.grid-container {
  display: grid;
  /* centers the whole group of grid items inside the container */
  place-content: center;
}

/* Syntax */
place-content: align-content;
place-content: justify-content;

/* Global values */
place-content: inherit;
place-content: initial;
place-content: revert;
place-content: revert-layer;
place-content: unset;
Widely available Since 2015 95% global usage

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

59+
45+
9+
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