Is there a way to make HTML elements have a width ranging from 150px to 200px while filling up 100% of their parent's width?
Check out Image 1:
https://i.sstatic.net/nYNGp.jpg
And here is Image 2 (after resizing the window):
https://i.sstatic.net/h0rsY.jpg
Now, take a look at Image 3 (resizing a bit more):
https://i.sstatic.net/LzOAa.jpg
Lastly, we have Image 4 (even more resizing):
https://i.sstatic.net/fTnwU.jpg
I attempted using flexbox, but the items are not fully occupying the 100% width:
(Kindly view the sinppet in full screen)
.flex {
display: -webkit-flex;
display: flex;
flex-wrap: wrap;
-webkit-flex-direction: row;
flex-direction: row;
-webkit-justify-content: flex-end;
justify-content: flex-end;
-webkit-justify-content: space-between;
justify-content: space-between;
background: #ff0000;
}
.flexitem {
display: -webkit-flex;
display: flex;
margin: 5px;
min-width: 150px;
max-width: 200px;
background: #000000;
border: 1px solid #ffffff;
}
<div class="flex">
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
<div class="flexitem"> </div>
</div>