Hey guys I’m learning about grid… was wondering if media query is still necessary when grid makes it possible to be responsive for desktop and mobile?
You may want to use media queries to change the layout of your grid, but if you have a simple layout, a media query is not necessary.
in the example above i needed to use a media rule.
so yes depending on the complexity of your layout media query is needed.
If you use a narrow-first approach to styling your page then initially you often won’t need a grid display (or flex) at all since you don’t have a lot of horizontal space and thus you just want the elements to stack on top of each other, which most of them will naturally do anyway. But as you widen the view port then you may want to shift the layout around and put things side-by-side using grid (or flex) and so you would use a media query break point to trigger this switch from default display to grid/flex.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.