Catogram
KPCKevin Powell - Community
•Created by Catogram on 8/11/2023 in #front-end
Specify Which CSS Grid Wraps First
I have two grids contained inside each other, as shown in this codepen. Effectively, I want it to break the outer grid first, so that I have two lines with groups of two, rather than breaking into groups of two vertically before breaking into lines in the outer grid.
In other words, currently there is a breakpoint that looks like this:
Instead, I want it to change straight between these two states:
I could make a media query, but I'm wondering if there's a simpler way to do it with grid.
1 replies