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

CSS Grid create new rows for each column dynamically if needed

$
0
0

I am working on a responsive layout, in the larger screens it will have 3x3 layout. The 1st column will be filled first. Once there are 3 items in the first column, the 2nd column will start to fill. And when there are 6 items in the first 2 columns, the 3rd column will start to fill. So up to 9 items they will be filled in this logic.But if there are more than 9 items, they will create extra rows. Below picture is a good representation of what I am trying to create

enter image description here

I have tried both grid-auto-flow: row and grid-auto-flow: column but none working correctly. Please give me idea about how can this be implemented, if possible. If not what is the alternate way to do this?


Viewing all articles
Browse latest Browse all 1675

Trending Articles



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