CSS justify-items property
Description
CSS justify-items property aligns child items horizontally (main/inline/row axis) within its container by adjusting the margins. We are using a grid container as an example.
Syntax
justify-items : normal | stretch | center | flex-start | flex-end
Property values
normalDefault
-
It stretches out the element horizontally to fill the width of container completely.
justify-items: normal;
stretch
-
It stretches the element so as fill the width of container completely.
justify-items: stretch;
center
-
It aligns the content at the middle of cotainer.
justify-items: center;
flex-start
-
flex-start aligns the current element at the start of grid container.
justify-items: flex-start;
flex-end
-
flex-end aligns the current element at the end of the grid container.
justify-items: flex-end;
Applicable to
It applies to multicol containers and grid containers..
From web4college, the free CSS digger
#CSS digger
Was this article helpful?
#First 1