M
M
MRcracker2019-11-10 20:42:52
Flexbox
MRcracker, 2019-11-10 20:42:52

How to make content in 2 columns?

How to make flexbox so that one column stretches 100% and wraps around other boxes?5dc84c1799aa5670814351.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
origami1024, 2019-11-10
@MRcracker

As for wrapping, you can give the first block a flex-basis of 100%, it will occupy the entire length of the axis
. Main ideas:

.wrapper { /*родителю*/
  height: 40vw; /*фикс высота*/
  flex-direction: column; /*флекс колонками*/
  flex-wrap: wrap;
}
.block{ /*внутренние блоки*/
  flex-basis: 33.3%;
}
.block:first-child{ /*первый 100%*/
  flex-basis: 100%;
}

Example:

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question