R
R
romasuk2017-10-20 10:29:07
css
romasuk, 2017-10-20 10:29:07

Why align-items: center; does it work that way?

Hello. There is a flex container in which flex items should be centered horizontally. Explain why the content of H1 is pressed to the left edge when the screen narrows? Here is the link
Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
0
0xD34F, 2017-10-20
@romasuk

Because the content of the section is centered, not the content of the content of the section. If you want the text in h1 to be centered, add . text-align: center;

R
romasuk, 2017-10-20
@romasuk

Thanks for the explanation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question