html - How can I make the last row of a flex box layout with "space-around" not be centered? -


i'm using flex box arrange equally-sized divs, , i've set justify-content: space-around. looks great rows except last one. i'd elements in last row left-most divs in previous rows.

this looks like:

enter image description here

and

enter image description here

and like:

enter image description here

and

enter image description here

how can achieve this?

currently, have css:

#container {   display: flex;   flex-flow: row wrap;   max-width: 400px;   border: 1px solid red;   justify-content: space-around }  #container > div {   border: 1px solid black;   width: 110px; } 

with html structure:

<div id="container">   <div>content</div>   <div>content</div>   ...   ... </div> 

here's fiddle: https://jsfiddle.net/chrisshroba/q2mm9ccj/


Comments