A
A
Andrey Yanduganov2015-09-27 08:11:26
css
Andrey Yanduganov, 2015-09-27 08:11:26

How to make the same indents for multi-line flexbox?

I have a flexbox with justify-content: flex-start . It's multiline. I need to achieve the same behavior as if it were justify-content: space-around , only that the elements on the last line (and there will almost always be fewer of them) are positioned exactly below the elements of the previous one. I tried to calculate the indents using calc, but everything depends on the number of elements in the line. Variants without using flex are also welcome, if they behave in a similar way. I hope for a solution without js.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question