Hi all, first of all I wanted to thank the creators of the “mdn” guides, they helped me a lot and are the best I’ve found.
finally I wanted to share my work to receive an evaluation and ask how I can get the same result in the grids without using media queries. I’ve tried rules like “auto-fit” and “minmax” but they give me an acceptable result only in case the columns are the same width.
Thanks again, regards.
You have correctly set all the CSS properties. Congratulations!
As you already mentioned, auto-fit can only be used when you want equally sized columns. So you can use it for the photos grid but not the main grid. I don’t see a way to replicate the functionality without using media queries.
In general, there’s nothing wrong in using media queries. There may be situations where a clever grid configuration can replace them, but it’s still perfectly fine to use media queries in modern code.