CSS grid – maximum number of columns without media queries
With CSS grid you can consider the use of max(width, 100%/N) where N is the maximum number of columns. If the width of the container increases, 100%/N will for sure be bigger than width, thus we won’t have more than N elements per row. .grid-container { –n: 4; /* The maximum number of columns */ … Read more