Typical CSS grid-layout places items in the grid left to right, then wraps to the next row, similar to using float:left
on a series of block elements.
I want to display (N) items vertically then start a new column. Is this possible?
Currently, I do this with JavaScript, inserting </div><div>
tags after every Nth item but was hoping for a CSS solution.
For example: Given an alphabetical list of 24 items that I want to display in 3 columns. 8 rows x 3 columns.
Items 1-8 will display in column 1, 9-16 will display in column 2 and finally, 17-24 will display in column 3.
1 | 9 | 17
2 | 10 | 18
3 | 11 | 19
and so on...
8 | 16 | 24