I have fixed width elements that I'd like to make a grid of. The only issue is that I want it to be responsive. Basically have as many items as it can have in one row, and then move the item to the second row as the space gets smaller.
I'm using frameworks like jeet.gs and it provides this very useful function called "cycle" which you can use to specify the amount of items you want in a row and it'll automatically create a grid for you. The only issue is that to make this responsive, meaning going from 4 items to 3 items in a row I need to do calculations like below(itemWidth*4) then do uncycle: 4
and cycle: 3
.
Which kind of sucks any general solution for this sort of problem?