I\'d like to implement a responsive grid-like layout using flexbox (without media queries). There can be variable number of elements in the grid. Each item should have fixed
You can't achieve this with flexbox out of the box (at least I didn't manage to do it). You can try with justify-content: center;
but this will center all childer and you'll get something like:
So the only solution I managed to find is to use another parent element and wrap everything in it.
Please see this CodePen http://codepen.io/justd/pen/rOeMGZ
I'm sure you'll find something working for you, just try to combine different CSS techniques.