Apologies if this is a duplicate question; I did search quite a bit but there are so many FlexBox questions (it's a confusing topic!). Anyway, I'm trying to create a horizontal row of boxes which have a minimum size and therefore will wrap when there are too many to fit on the one row. This part I have completed.
The problem is, it doesn't seem possible to both have the flex items fluid so that they fill up the parent container and have them all stay the same width between rows.
#container {
display: flex;
flex-wrap: wrap;
}
.box {
flex: 1;
min-width: 150px;
border: 1px solid #ccc;
background-color: #eee;
margin: 12px;
padding: 4px;
}
<div id="container">
<div class="box">Box 1</div>
<div class="box">Box 2</div>
<div class="box">Box 3</div>
<div class="box">Box 4</div>
<div class="box">Box 5</div>
</div>