Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Aligning Items Vertically in Flexbox | Section
CSS Fundamentals for React Developers - 1768407374224

bookAligning Items Vertically in Flexbox

The align-items property governs the vertical arrangement of flex items. Its default value is stretch.

align-items: stretch | center | flex-start | flex-end | baseline;

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.html

index.css

index.css

copy

center

Items are in the center of the cross axis.

index.html

index.html

index.css

index.css

copy

flex-start

All items start at the beginning of the cross axis.

index.html

index.html

index.css

index.css

copy

flex-end

All items are in the end of the cross axis (in the end of the parent flex container).

index.html

index.html

index.css

index.css

copy

baseline

All flex items are aligned based on their text content baseline.

index.html

index.html

index.css

index.css

copy

1. What does the align-items property do?

2. Which of the following values can be used with the align-items property?

question mark

What does the align-items property do?

Select the correct answer

question mark

Which of the following values can be used with the align-items property?

Select all correct answers

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 30

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

bookAligning Items Vertically in Flexbox

Veeg om het menu te tonen

The align-items property governs the vertical arrangement of flex items. Its default value is stretch.

align-items: stretch | center | flex-start | flex-end | baseline;

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.html

index.css

index.css

copy

center

Items are in the center of the cross axis.

index.html

index.html

index.css

index.css

copy

flex-start

All items start at the beginning of the cross axis.

index.html

index.html

index.css

index.css

copy

flex-end

All items are in the end of the cross axis (in the end of the parent flex container).

index.html

index.html

index.css

index.css

copy

baseline

All flex items are aligned based on their text content baseline.

index.html

index.html

index.css

index.css

copy

1. What does the align-items property do?

2. Which of the following values can be used with the align-items property?

question mark

What does the align-items property do?

Select the correct answer

question mark

Which of the following values can be used with the align-items property?

Select all correct answers

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 1. Hoofdstuk 30
some-alt