+ 2

CSS GRID VS CSS MEDIA QUERIES

CSS grid or CSS media queries which one is best for makings a webpage responsive. Your constructive suggestions is much appreciated❤ Thanks all

5th Oct 2020, 5:08 AM
Mohd Aadil
Mohd Aadil - avatar
3 Antworten
+ 2
Media queries and grids are two different concepts, used separately. Media queries are most of the times used to create different CSS rules according to the device resolution (what we commonly call breakpoints). For example, you can change the width of your grids according g to the width and height of the user's device. If the user is using a desktop computer, your grid width would be displayed larger than if the user is using a phone. Basically, you can (and should) use both at the same time to create responsive designs. And no, CSS queries are not slow . Once your CSS loads up, they take effect as any other CSS rule.
5th Oct 2020, 10:04 AM
CHMD
CHMD - avatar
+ 3
I'd say Grid or Flexbox. Media query takes time to code everything manually but Grid and Flexbox can do that for you with minimal code.
5th Oct 2020, 7:14 AM
Raj Chhatrala
Raj Chhatrala - avatar
+ 1
So I can say that CSS media query work slow than CSS grid
5th Oct 2020, 7:48 AM
Mohd Aadil
Mohd Aadil - avatar