Answer the question
In order to leave comments, you need to log in
How to lay out justify-content: space-between so that if there is one / two elements, they get up in flex-start?
Hello. There are such blocks:
I laid them out using display: inline-block and percentage width. But this is not reliable, something can go under certain conditions. How can we lay out these blocks using flex, namely so that if we have 2 or 4 blocks instead of all 12, then they would get up in flex-start? Or is there some other way to make it work? Thank you.
Answer the question
In order to leave comments, you need to log in
Well, you can immediately do flex-start and specify indents with your hands
.list
display block
font-size 0
.list__item
display inline-block
font-size 1rem
width 33.33333334%
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question