align-items
![](/_next/image/?url=https%3A%2F%2Fstatic-staging.d-libro.com%2F01-course-content-images%2F1011-10-HTML-CSS-Introduction%2F010-main-figures%2Falign-items-id101110150610.webp&w=1920&q=75)
The align-items
property is used to set a layout pattern of flex items (nested child elements) along the cross axis of the flex container. The cross axis is typically the vertical axis unless you set column
or column-reverse
in the flex-direction
property. We'll provide our explanation based on the default flex-direction
setting.
This property is effective when the flex items are placed only in one line. When the flex items are wrapped, you need to add the align-content
property, which will be explained in the next topic.
flex-start
This is the default setting. With this property value, flex items are laid out at the top edge of the parent element.
Note: 'edge' means the endpoint with some distance from the edge of the element based on the container's paddings and flex item's margins.
![align-items: flex-start align-items: flex-start](https://static.d-libro.com/01-course-content-images/1011-10-HTML-CSS-Introduction/020-image-insert/align-items-flex-start-id101110150610-img01.webp)
center
With this property value, flex items are laid out in the c
Subscribe now for
uninterrupted access.