CSS place-items Property
border: 1px solid black;
The place-items CSS property align items along both the block and inline directions at once (i.e. the align-items and justify-items properties) in a relevant layout system such as Grid or Flexbox. If the second value is not set, the first value is also used for it.
The place-items property is a shorthand for the following CSS properties:
place-items: normal | stretch | baseline-position | [ overflow-position ? self-position] |initial|inherit|revert|revert-layer|unset;
The following table describes the values of this property:
|Behaves as normal if the box has no parent, or when determining the actual position of an absolutely positioned box. It behaves as the computed align-items value of the parent box (minus any legacy keywords) otherwise (including when determining the static position of an absolutely positioned box).
|Represents the “default” alignment for the layout mode. Its behavior depends on the layout mode, as described below.
|This is default value. Items are stretched to fit the flex container. The free-space is divided equally between all the items.
|Items are positioned at the baseline of the flex container.
|Items are positioned at the center of the flex container.
|Items are positioned at the end of the flex container.
|Items are positioned at the beginning of the flex container.
|The items are packed flush to each other toward the start edge of the alignment container in the appropriate axis.
|The items are packed flush to each other toward the end edge of the alignment container in the appropriate axis.
|The items are packed flush to the edge of the alignment container of the start side of the item, in the appropriate axis.
|The items are packed flush to the edge of the alignment container of the end side of the item, in the appropriate axis.
|Used alongside an alignment keyword. If the chosen keyword means that the item overflows the alignment container causing data loss, the item is instead aligned as if the alignment mode were start.
|Used alongside an alignment keyword. Regardless of the relative sizes of the item and alignment container and whether overflow which causes data loss might happen, the given alignment value is honored.
|Sets this property to its default value.
|If specified, the associated element takes the computed value of its parent element animation-delay property.
|Reverts the cascaded value of the property from its current value to the value the property
|Rollback styles to the ones specified in previous cascade layers.
|Resets a property to its inherited value if the property naturally inherits from its parent, and to its initial value if not.
Default CSS Property Values
place-items: normal legacy;