I am trying to create a grid that only allows 1, 2 or 4 columns.
In a mobile format I set the grid to be vertical, so this is no problem.
But in a desktop format, at certain widths, the grid will become three columns which creates an unaesthetic appearance. I’ve attached a screenshot of the site at such a width to show what I mean.
I have tried dividing the elements into two div boxes and putting those in the grid.
While that does technically limit the columns to 2 or 4, it comes with several other visual issues.
I would greatly appreciate any advice.
For reference, the effect I am attempting to achieve is essentially the one on this website: https://moz.com/
Specifically, the section labeled “Moz Pro: the proven, all-in-one SEO toolset”.
The problem I have is that within the initial desktop breakpoint there are screen sizes where the grid elements become too thin. Because of this, I would prefer that it change from 4 in a row to 2 rows of 2.
I am able to achieve this effect for the most part. However, I want to eliminate the in-between effect of 3 elements in the upper row and 1 in the lower.