Quantcast
Channel: Active questions tagged flexbox - Stack Overflow
Viewing all articles
Browse latest Browse all 1320

Dynamically sizing flex items while keeping consistent size on last row [duplicate]

$
0
0

My flexbox container has a variable width and children can shrink until 150px and grow up to 250px. This works as intended except, when the last row is not full of children, they grow larger than children on full rows. How can I have varying sizes for flex children while keeping all children the same size?

#products-list {    position:relative;    display: flex;    flex-flow: row wrap;    width:100%;}#products-list .product {    min-width:150px;    max-width:250px;    margin:10px 10px 20px 10px;    flex:1;}

I created a dynamic situation in jsFiddle


Viewing all articles
Browse latest Browse all 1320

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>