I'd like to have a container with dynamic width that will always have 3 columns per row, first column stick to the left, second column in the center of the entire row and third column stick to the right. Is there an automatic way to achieve this?
<div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
|x x x|
|x x x|
|x |
I was trying
display: flex;
flex-wrap: wrap;
justify-content: space-between;
and for items
flex: 1 0 30%
but the 30%
makes the items wider like:
|x x x |