I trying to create a CSS grid that will have specific columns (row by row) where I can add any number of DIVs, which will be added in specific order:
[1] [2] [3]
[4] [5]
[6] [7] [8]
[9] [10]
etc
But also I want to be able to access the div of each "subgroup" (1-3, 5-8, 4-5, 9-10 etc) to edit their "insides" by CSS
Any help would be appreciated.
I tried to use grid-template-columns
, but all I’ve achieved is displaying elements three in a row via repeat(3, 1fr)
3
Answers
do something like
<div style="grid-row: 1/2">3</div>
and<div style="grid-row: 3/4">8</div>
but not sure how you would do it with unlimited elementsConsider a 6 columns configuration:
you can try this as well