Aligning Items Vertically
The align-items
property governs the vertical arrangement of flex items. Its default value is stretch
.
Let's run the following examples to get where do we need it.
stretch
It means that we extend items to the entire length of the cross axis.
index.html
index.css
index.js
center
Items are in the center of the cross axis.
index.html
index.css
index.js
flex-start
All items start at the beginning of the cross axis.
index.html
index.css
index.js
flex-end
All items are in the end of the cross axis (in the end of the parent flex container).
index.html
index.css
index.js
baseline
All flex items are aligned based on their text content baseline.
index.html
index.css
index.js
Which of the following values can be used with the align-items
property?
Select a few correct answers
Everything was clear?
Course Content
CSS Fundamentals
CSS Fundamentals
Aligning Items Vertically
The align-items
property governs the vertical arrangement of flex items. Its default value is stretch
.
Let's run the following examples to get where do we need it.
stretch
It means that we extend items to the entire length of the cross axis.
index.html
index.css
index.js
center
Items are in the center of the cross axis.
index.html
index.css
index.js
flex-start
All items start at the beginning of the cross axis.
index.html
index.css
index.js
flex-end
All items are in the end of the cross axis (in the end of the parent flex container).
index.html
index.css
index.js
baseline
All flex items are aligned based on their text content baseline.
index.html
index.css
index.js
Which of the following values can be used with the align-items
property?
Select a few correct answers
Everything was clear?