Hi, as others have said,
- use grid-template-columns in media queries
- remove the widths and heights from body
- definitely remove heights from the boxes
Really, the easiest way to make it properly responsive would be to :
-
Let mobile be the base you start from. Display flex column, use the gap property to set gap between boxes
-
At mobile size in a min width media query display grid and use named grid areas to lay out each box. Make the grid layout whatever you like that works
-
At desktop in a min width media query move your current desktop grid template properties
As long as you have a max-width on that grid, it should look great on any screen size.
Hope thats helpful
This is my solution for this which may help https://www.frontendmentor.io/solutions/mobilefirst-css-grid-layout-with-scss-and-flexbox-in-card-headers-gyfp18V1o
Remember to upvote every comment you find helpful βΊ
@Naveed-1998
Posted
@grace-snow Thanks for all the tips, I'll make sure to remember this for next time