W
W
Worddoc2017-09-19 10:34:12
css
Worddoc, 2017-09-19 10:34:12

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:
17eaff44a5294c06aa044add139807b3.PNG
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

2 answer(s)
E
Egor Zhivagin, 2017-09-19
@Krasnodar_etc

Well, you can immediately do flex-start and specify indents with your hands

G
Grigory Vasilkov, 2017-09-19
@gzhegow

.list
  display block
  font-size 0

.list__item
  display inline-block
  font-size 1rem
  width 33.33333334%

And nothing will go.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question