Erick_Flatcher2017-03-23 00:51:39
Erick_Flatcher, 2017-03-23 00:51:39

7 blocks in the center. How is it better?

Hi friends! No code needed, just advice. A fresh look, and then a little blurred eyes. ;)
There is a 100% bg and a 1400px container in it. There are 7 adaptive blocks. They are arranged either 3+3+1, or 2+2+2+1, or all vertically. They need to be in the middle of the block. I wanted to make Flexbox left-aligned and sized 33.333%, 50% and 100% respectively, and media queries (I like media queries more than automatic wrapping of Flex boxes, because of more control). But I want it in the center. The last block in this case will also be in the center, and this, of course, is bad. Aligning the last block to the left will not work either, since it will be to the left of the rest. Hope it's not too confusing. ;)
NB: This looks like a perfect option: fixed blocks + Flexbox with Space-around + media queries. But, again, the last block will hang crooked. :(((
What to do? I thought of just making all the blocks fixed and pushing them into a fixed container and changing the conditions for only 3 times through media queries. But at some resolution, there is too much indentation around. I don’t want to do 100 media queries for this. And finally something wrong..
Can you suggest something else?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
sergey, 2017-03-23

Honestly, I didn’t understand anything from your long story, but what I understand looks like this:
with adaptability, blocks (fixed width) will adjust to the width of the screen

Egor Zhivagin, 2017-03-23

If you need center, then you can twist this

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question