10weller01
New Coder
I am using CSS grid to display lots of 'tiles' on the page, each with its own clickable button that takes the user to an external link. I want the grid to take up the full width of the available space but it isn't - instead it snaps to a new width when I'm shrinking the browser window. Strangely it does work as intended when the grid is down to 2 columns.
Screen recording of how it looks.
Here is the code used for the grid:
Screen recording of how it looks.
Here is the code used for the grid:
Code:
.posts {
display: grid;
grid-gap: 1.5rem;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
height: 100%;
}