I want to create a div with 2 columns, when I add an item in the parent div it should be in the first column, when the first column has 3 elements and I want to add other items it should Located in the second column. This is the image I'm looking for:
I found no response on the internet, I tried the css grid generator but without any results..
CSS Grid Generator but I can't get the right answer
Ok...it looks like you just have a problem with mesh flow. To change it, use
grid-auto-flow:column;
That's it, the grid's flow will change from rows to columns. You can changegrid-template-rows
as needed.What you need to do in html is:
and CSS:
Demo