DEV Community

Cover image for CSS Grid Cheat Sheet Illustrated in 2021🎖️

CSS Grid Cheat Sheet Illustrated in 2021🎖️

Joy Shaheb on March 04, 2021

Today we're gonna learn CSS Grid properties so that you can make your own responsive sites. I'll explain how each of Grid's properties work along w...
Collapse
 
devlorenzo profile image
DevLorenzo • Edited
Collapse
 
joyshaheb profile image
Joy Shaheb

Sure 😄

Collapse
 
devlorenzo profile image
DevLorenzo

Added! You can find it in the CSS section --> Grid

Ps: Leave a like if you want 🙃

Thread Thread
 
joyshaheb profile image
Joy Shaheb

You can also include this cheat sheet for flexbox, and nice collection btw, keep up the good work <3

Thread Thread
 
devlorenzo profile image
DevLorenzo • Edited

Added! If you want I propose you that I put your two cheat sheets in a more evident way (I write "go check this cool cheat sheets", I put a more visible link, a photo ...) and in exchange in your two articles you add the liquid tag of my compilation (at the end or at the top).
I did my part! it's your turn now

Reply if you accept.

Collapse
 
billraymond profile image
Bill Raymond

Recently, I built my site from scratch using CSS Grid as my only layout mechanism and love it. That said, even though I used it nearly every day for two months, it was super difficult to remember the correct term (I still forget the differences between justify and align). There are so many great sites out there, but this is by far the easiest cheat sheet I’ve ever seen. Thanks!

Collapse
 
deadlyhifi profile image
Tom de Bruin

I always forgot too, then I heard a handy tip. You justify text in a text editor, so that’s the horizontal X axis (provided you haven’t flipped the grid).

Collapse
 
billraymond profile image
Bill Raymond

That’s a great memory jogger, thanks!

Collapse
 
joyshaheb profile image
Joy Shaheb

You're welcome, I'm glad you like it 😄

Collapse
 
hellonearthis profile image
Brett Cooper

Constantly referring to the views are boys is very sexist.

Collapse
 
joyshaheb profile image
Joy Shaheb

My apologies, Next time I'll address everyone

Collapse
 
hellonearthis profile image
Brett Cooper

Cool, Dev.to is an inclusive community.

Collapse
 
calag4n profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
calag4n

No, it isn't.
Fragile people like you make the world dumber.

Collapse
 
hellonearthis profile image
Brett Cooper

You must be a boy as to not see that this is sexist to females who are watching this video. You're also the fragile one that was triggered to respond to a comment about sexisum. Even the OP recognized that it was a mistake not to be inclusive.

Thread Thread
 
calag4n profile image
Comment marked as low quality/non-constructive by the community. View Code of Conduct
calag4n

You must be a boy as to not see that this is sexist to females

🤣 Thanks, you made my day !!

Do you even see that you are the only one who made a sexist sentence here ?!
Ironic-Man 🦸

Collapse
 
aneeqakhan profile image
Aneeqa Khan

thats the cutest article becoz of unicorn emojis :D
good work!

Collapse
 
joyshaheb profile image
Joy Shaheb

I'm glad you like it 😄

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
joyshaheb profile image
Joy Shaheb

Check before the conclusion. Thanks

Collapse
 
viktorwong profile image
viktor

hello,I am Chinese Front end developer!
I think this article is very good!

so I hope more people learn!
can I translate and reorganize this article to the Chinese community "juejin.cn"?

Collapse
 
joyshaheb profile image
Joy Shaheb

Ya sure. Go for it. I also have a cheatsheet on flexbox. You can find it on my profile. I hope both of these articles will be helpful. Have a nice day ^^

Collapse
 
viktorwong profile image
viktor

yeah,thank you evey much!

Thread Thread
 
joyshaheb profile image
Joy Shaheb

Also, send me a link of your finished article :"D
best of luck, if you need the high quality images of the article, do let me know ^^

Thread Thread
 
photoshopvip profile image
Photoshop VIP

Hey, what a great article, love it!

Absolutely informative and clear at the same time about CSS Grid.
Would you give us your permission to translate into Japanese and share this our audience on our blog (photoshopvip.net), please?
I’ll have the author and original link (clickable) in the post.

Thread Thread
 
joyshaheb profile image
Joy Shaheb

For sure! I hope you best of luck !

Collapse
 
iulyaav profile image
Iulia

This is not only super useful, but super cute. I've recently started a project that is based heavily on visuals and I got stuck in layering. I think you just gave me bonus ATK points in my fight against the CSS monster XD

Collapse
 
joyshaheb profile image
Joy Shaheb

I'm glad you like it. I have a similar post for flexbox, I hope it helps :"D

Collapse
 
madrafj profile image
Ahmad Rafsanjani

Great, it helps me understand Grid better.. recently i used grid and flex altogether.. grid for layout and flex for positioning.. but after read your post seems like flex wont be necessary at most case for me..
Anyway, nice illustration

Collapse
 
joyshaheb profile image
Joy Shaheb
Collapse
 
cnerd profile image
Robert Mitchell

Great article! Just started learning css and the illustrations are very helpful. Thanks!

Collapse
 
afif profile image
Temani Afif

Technically when using a gap, the grid line acquire the size of that gap (it's not a line in the middle having half the gap on each side). From the specification

The effect of these properties is as though the affected grid lines acquired thickness:

Collapse
 
ms314006 profile image
Clark

Nice post! I wonder know what is the difference between 1fr and auto?

Collapse
 
joyshaheb profile image
Joy Shaheb

Auto takes up remaining space of screen. 1fr divides the entire screen into fractions. Let's say you have 5 kids and $50. You equally divide the money among the kids. Same case applies for 1fr( 1 fraction). And it is the same as the mathematical fraction problems we did back in high school or before. Thanks !

Collapse
 
ms314006 profile image
Clark

Thanks!

Collapse
 
codedgar profile image
codedgar • Edited

Wow this is a complete masterclass on how to use grids, thanks!

Collapse
 
sandralundgren profile image
Sandra Lundgren

I came here for the cute illustrations, and stayed for the quality info 😊 Instant bookmark 📚

Collapse
 
joyshaheb profile image
Joy Shaheb

More quality content incoming pretty soon 🌹

Collapse
 
abdulrahman_ali profile image
Abdulrahman Ali

Loved it. Keep going <3

Collapse
 
bilalbajou profile image
bilalbajou

Can you compile these images into a pdf file so that we can print them?

Collapse
 
fahimhassanmollah profile image
Fahim Hassan Mollah

Borther your are Bangladeshi,,,,happy to see you here,,,

Collapse
 
andrewbaisden profile image
Andrew Baisden

Wow nice I like the art style.

Collapse
 
nevkatz profile image
Nevin Katz

This tutorial is awesome.

Collapse
 
simbiosis profile image
SIMBIOSIS

Cheat sheets are great to have the main and important stuff at hand,specially for those who are not experts in a specific subject but need to be involved once in a while. So, thank you this one.

Collapse
 
mpelyhes profile image
MPelyhes

Thank you for sharing this! The visualizations are very helpful, and I will be coming back to reference your cheat sheet the next time I'm working with grid.

Collapse
 
muzammilaalpha profile image
muzammilaalpha

Good one!

Collapse
 
jackkeller profile image
Jack Keller

Great article! While grid feels pretty simple most times it's easy to sort of forget bits and pieces along the way!

Collapse
 
ra1nbow1 profile image
Matvey Romanov

Ultimate cheat sheet!

Collapse
 
dominik_gorczyca profile image
Dominik Gorczyca

If this is not an unicorn then I don't know what is :D

Collapse
 
brandondamue profile image
Brandon Damue

Great article Joy.

Collapse
 
vishal2369 profile image
Vishal2369

Super handy

Collapse
 
zulfwz profile image
Zul-fwz

Thank you so much.

Collapse
 
joyshaheb profile image
Joy Shaheb

You're welcome :"D

Collapse
 
damimd10 profile image
Damian

Awesome resource I'll share with my friends

Collapse
 
willsoon profile image
willsoon

This is amazing! Thank you.
(Please could you fix the Justify-Content typo in the graphic?)

Collapse
 
joyshaheb profile image
Joy Shaheb

Thanks man ! :"D

Collapse
 
ignaciorm profile image
IgnacioRCM

Good work! <3

Collapse
 
nikhilmwarrier profile image
nikhilmwarrier

Super handy! Loved those cute graphics!

Collapse
 
suhakim profile image
sadiul hakim

We want more content like this one ❤.

Collapse
 
gabrieljm profile image
Gabriel José

Really good, congratulations 👏🏻