It stretches the height of the items based on the highest item. This is the default value of align-items. It aligns the items on the bottom (end) of the flex container. It aligns the items vertically on the center of the flex container. ⭐ This value is used most often to control the vertical position of flex items. It aligns the items on the top (start) of the flex container, and the height of each item is maintained as it is. By default, flex is stretching the height of the items based on the highest item.īut when we need to, we can control the vertical position ( cross axis) of the items with align-items.Ĭontrolling The Vertical Position of Flex ItemsĪlign-items property is good to be applied when we have an element that has background color/shadow/borders so we can see the effect.
0 Comments
Leave a Reply. |