DEV Community

Cover image for Introduction to CSS Grid: What You Should Know

Introduction to CSS Grid: What You Should Know

Kara Luton on February 17, 2019

I first heard about CSS Grid towards the end of 2016. I was sitting at one of my first Tech Ladies meetings and an attendee mentioned hearing how a...
Collapse
 
jess profile image
Jess Lee

Bookmarking this!

Collapse
 
techgirl1908 profile image
Angie Jones

same! special thanks for the firefox inspector tip!

Collapse
 
karaluton profile image
Kara Luton

Of course! Their inspector tools for grid are next level.

Collapse
 
simsar profile image
Simsar joo

Nice content but codes are wrong. And you shared missing data. With the codes you provide, we are unable to create content in the subject. We have to write code from extras. Html codes used incorrectly. But the article is generally described correctly and beautifully. Thanks for everything.

Collapse
 
karaluton profile image
Kara Luton

Hi Simsar,

Not totally sure what you mean but all the code is correct. The only thing that I didn’t include is the styling for the individual items since that’s just adding background-color and font-size. Would love to know if I may have overlooked something so I can update the article!

Collapse
 
rhymes profile image
rhymes

Thanks Kara, really good intro!

Collapse
 
strahinjalak profile image
Strahinja Laktovic

Very nice, bookmarking as well. Really wanted something like this about grid, all in one place!

Collapse
 
cbdel1 profile image
cbdel1

This is a great overview! I'm going to play around with this today. Thank you!

Collapse
 
jaakidup profile image
Jaaki

I'm trying this tonight!

Collapse
 
pavanbelagatti profile image
Pavan Belagatti

Wonderful article. Sharing this on my social channels.

Collapse
 
mvasigh profile image
Mehdi Vasigh

Great timing for me, having just stumbled onto a perfect layout use case. Thanks for an awesome post.

Collapse
 
thomasjunkos profile image
Thomas Junkツ

Thanks for the writeup!

I haven't looked into CSS grid until now. Bookmarked this as a starter :]

Collapse
 
taylorvincent profile image
Vincent Taylor

Have not used css grid before. Do you still use flexbox when creating new things or
only css grid?

Collapse
 
karaluton profile image
Kara Luton

You can use them together but CSS Grid can do almost everything that flexbox can (except for reversing rows/columns and some animation) so I haven't had a use-case where I've personally used both together.

Collapse
 
qm3ster profile image
Mihail Malo • Edited

LMAO I bought those books too xD
(In the cover image)

Collapse
 
karaluton profile image
Kara Luton

Haha I definitely did too. I'm sure they're a little outdated now but I loved how visual they were!

Collapse
 
mandax profile image
Anderson

You can also check gridbyexample.com/examples/

Collapse
 
karaluton profile image
Kara Luton

Yes! That has some great examples.

Collapse
 
thecodezs profile image
Kehinde Abe

Learnt a new thing today. Never knew "grid-auto-flow: dense." exist.Thank you for this Kara.

Collapse
 
karaluton profile image
Kara Luton

You're welcome! Be careful with grid-auto-flow: dense if you're trying to meet any accessibility standards though. It does mess up your source order so things will be read out of order on a screen reader.

Collapse
 
joaquinattademo profile image
joacoattademo

Very clear explanation, I was kind of lost with this topic in particular, but this helped a lot!