What is the first thing you think of when someone says responsive websites? What comes rushing to your mind when you think of the most important pi...
For further actions, you may consider blocking this person and/or reporting abuse
Grid layouts are the best way to make most of the website's responsive,
But you also do it with media queries in css
@cmuralisree Thanks for taking out time to read. Its good to hear about Grid when discussing responsive websites but just to mention, responsive websites aren't as simple as "big stuff on bigger screen and smaller elements on smaller screens". You will need media queries when you want to hide/show some component based on the screen size for example. This is only one example. Remember grid can not rule out the application of media queries.
You can participate in this discussion if you feel like. For ease I will quote my favorite answer from the forum.
Cheers :)
Making responsive pages are big task, and it's true grid cannot replace the media queries, but grid can lower the usage of media queries in certain pages,
For ex: e-commerce items, news cards, for those you can make,
grid layouts
Note: these can only be used on few pages or sections, but we can't use them everywhere
flexbox
There are still lot to learn about grid or flex,
but we cannot swap media queries by using grid or flex box, these are only limited to few styles, but rest we have to use media queries
thank you for inviting me to the discussion, I will definitely look into it
I am coming conversant with the flexbox. Would try the grid too
Yeah flexbox Is good, it's older than grid, but also the most searched stuff in caniuse.com,
Bur grid is newest entry to the web and it has a lot to offer than flexbox, but also bit complicated than flexbox,
flexbox needs to be combined with queries to make it responsive,
But grid mostly doesn't need queries because of inbuilt layouts and other attributes.
These were upto my knowledge, I might be wrong
I would love you to share how to write grid without queries please.
As I said Previously grid cannot entierly used without media queries, but in few cases we can stop using queries,
Ex: grid-template-columns: using this we can make a page like {youtube, ecommerce, or few blogs} responsive without using queries, this will make the elements inside it to be take the given ammount and renders it on the screen based on screen size,
link : codepen.io/murali-sree-krishna/pen...
you can alter the number of divs or components displayed on the screen by increasing the size in "grid-template-columns: repeat(auto-fit, minmax(size, 1fr));"
These were upto my knowledge, I might be wrong
Very helpful buddy... Thanks
When it comes to responsive pages, the first thing I remember is
css grid
.I've always struggled using media queries for various reasons.
@ashkanmohammadi Thanks for taking out time to read. Its good to hear about Grid when discussing responsive websites but just to mention, responsive websites aren't as simple as "big stuff on bigger screen and smaller elements on smaller screens". You will need media queries when you want to hide/show some component based on the screen size for example. This is only one example. Remember grid can not rule out the application of media queries. Cheers :)
Nice post, thanks!
:)
I enjoyed this very much.
@mickeydluffy I am glad you liked it :)
Nice post. I enjoyed reading this. Thanks!
@rakeshkb glad you did, thank you :)