I'm currently making use of the flexbox flex-wrap
ability with space-between
to nicely space out wrapped items, but the last row doesn't align its items with the columns.
#container {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
width:450px;
background-color:lightblue;
}
#container > div {
width: 100px;
height: 50px;
background-color: red;
}
#container > div:nth-child(odd){
height: 30px;
}
<div id="container">
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
The items are the same width for now (but the container won't be), but may not be in future. I'm aiming for the following:
Am I expecting too much from flexbox, or is there a simple alternative approach?