So I built a website resembling a template that I found. The website has two grids in it and I want to change the number of columns and rows with media queries to make the website responsive. However, the media queries just refuse to work properly. There are 2 problems: 1) It does what I want but not WHEN I want, 2) It doesn't do anything at all.
@media screen and (max-width:760px) {
body{
background-color: green;
}
}
this, for example, will work, but the color changes only when the screen is at least 600px wide
@media only screen and (max-width: 760px) {
#grid {
grid-template-columns: 1fr 1fr ;
grid-template-rows: 2fr 2fr 2fr 2fr;
}
}
This one won't work at all. Please help, this is so frustrating, I feel dumb