Grid that is max 4 cola but can expand

I have a use case of a grid that I want it to be 4 cola however there are some items in the grid that are larger so I want them to take 2 3 cola but only based on their width so basically I want the grid to adjust itself
2 Replies
MarkBoots
MarkBoots3d ago
can you provide us an example. what kind of content are those items. maybe a demo codepen
Chris Bolson
Chris Bolson2d ago
I suspect that you will either need to use flex or, if that isn't an option, you will need to use JS to get the width of each element before applying the number of columns that it needs to span.
Want results from more Discord servers?
Add your server