V
V
Vladislav2020-09-09 17:23:41
css
Vladislav, 2020-09-09 17:23:41

How to align child elements in Flexbox?

Help me please.
you need to use flexbox to make sure that the .new block is flush with the .new-content block, which is located in the middle with equal distance between the .new-box blocks nested in it .
I've already broken my head, I can't do it.
ps picture with visualization attached =)
Thank you!

.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #f5f0e1;
}

.new {
  display: flex;
  align-self: normal;
} /* в этом блоке заголовок h1*/

.new-content {
  display: flex;
  flex-direction: row;
  justify-content: space-around;
}

.new-box {
  width: 20%;
  height: 400px;
/*здесь картинка*/
}


Picture for clarity:
5f58e5582433d439031501.jpeg

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nikita Mikhailov, 2020-09-09
@vladis26

Set .new to the same width as .new-content

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question