Learn CSS Grid the easy way

It can be easy to get bogged down in how grid works, with a lot of new properties, values, and even units! So let's try and simplify things as much as possible, because to get started, you don't need to know everything about how Grid works.
🔗 Links
✅ The GitHub repo: github.com/kevin-powell/learn...
✅ More videos on grid: • Getting started with C...
⌚ Timestamps
00:00 - Introduction
01:01 - How we're approaching this
02:01 - What we are working on
02:39 - What we are starting with
03:08 - Declaring display grid
03:59 - The gap property
04:47 - Use your grid inspector
06:06 - How many columns do you need
06:59 - You probably don't need to declare rows
12:48 - Spanning columns
15:09 - Placing things in specific places on your grid
17:52 - Working with line numbers
24:56 - Working with media queries
28:21 - grid-template-areas
35:38 - auto-columns and rows
#css
--
Come hang out with other dev's in my Discord Community
💬 / discord
Keep up to date with everything I'm up to
✉ www.kevinpowell.co/newsletter
Come hang out with me live every Monday on Twitch!
📺 / kevinpowellcss
---
Help support my channel
👨‍🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - code.visualstudio.com/
---
I'm on some other places on the internet too!
If you'd like a behind the scenes and previews of what's coming up on my KZread channel, make sure to follow me on Instagram and Twitter.
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Пікірлер: 775

  • @KevinPowell
    @KevinPowell2 жыл бұрын

    It was pointed out that at 11:47 I got things backwards! Declare those columns, only declare the rows when you need to!

  • @ZattalovOffishal
    @ZattalovOffishal2 жыл бұрын

    I swear that i was googling “css grid” to understand that thing, i went to youtube to dive more, suddenly I found you just uploading this video… MAGIC, i love you teacher

  • @shaderone07

    @shaderone07

    2 жыл бұрын

    Yeah me too... I guess kevin can read minds

  • @ngoako

    @ngoako

    2 жыл бұрын

    Haha same

  • @mattifresh

    @mattifresh

    2 жыл бұрын

    Bro! Same🤣

  • @Cognitoman

    @Cognitoman

    Жыл бұрын

    I like turtles

  • @TulsiCurryWorld

    @TulsiCurryWorld

    Жыл бұрын

    I agree . Awesome

  • @DollarEggNog
    @DollarEggNog4 ай бұрын

    This is the definition of a humble flex. He's showing off his testimonials whilst teaching us priceless information. He's a good man, this Kevin.

  • @Humpfinger
    @Humpfinger2 жыл бұрын

    Honestly, your style of teaching has grown to such an incredible level. Even video’s as early as a year ago are nothing compared to the way you make your video’s now. Unique, nice to watch, and very clear. Mad probs to you Kevin!

  • @k1mpman

    @k1mpman

    2 жыл бұрын

    I study webdev and he's a favorite among me and my classmates, he's addicting

  • @johnryder8464

    @johnryder8464

    3 ай бұрын

    Addictive is the correct word🙄👎

  • @JennyZibreva
    @JennyZibreva2 жыл бұрын

    Kevin you're one of the best CSS-teachers out there! Such an awesome teaching style and great content! Can't wait to learn more with you, keep up great work 🙂 Cheers!

  • @kassimbabika
    @kassimbabika Жыл бұрын

    The best video on how to start using CSS grid I have had the pleasure to lay my eyeballs on. Bar none. If you don't get grid after watching this video, then...you're probably a dolphin.

  • @ericsmith3127
    @ericsmith31272 жыл бұрын

    Wow Kevin! You have a natural gift for teaching. I’ve been working in the software biz for over 10 years and ingest a ton of videos and blogs. You are hands down one of my favs!

  • @kagune6585
    @kagune65852 жыл бұрын

    This is amazing. I just started studying HTML and CSS on my own a few days back and doing layouts was insanely confusing. After watching this video I swear I’ve been able to get beautiful layouts! I’ll definitely check more of your videos, keep up the great work.

  • @UweKempf
    @UweKempf2 жыл бұрын

    Kevin, Thank you for the great video. It’s easy to find “how“ explanations on the internet. But you very often give me the “why and why not use this feature“. That makes you my go to channel for CSS 🤩 Keep on your excellent work! 😊

  • @Harlem1991
    @Harlem19912 жыл бұрын

    Have just finished teaching an undergraduate introduction to HTML and CSS. Grid areas is such an easy way to create a responsive layout. Then with a couple of lines of code you have a flexbox based responsive navigation bar. Gone are the days of tables within tables! Thanks for the video.

  • @uLone
    @uLone Жыл бұрын

    This was such a good tutorial! I normally work in the backend and I've had nothing but stress when working with CSS lately. So it's nice to find someone who makes front end developing just as fun as backend!

  • @bishwajeetpandey1570
    @bishwajeetpandey15702 жыл бұрын

    I always used to avoid grid due to it's complexity but now i can use it in my projects , you made things really simplest ❤️ Thx for this video.

  • @davidmyersdev
    @davidmyersdev2 жыл бұрын

    I found your channel recently, and I've been loving your videos! Thanks for helping so many to understand CSS better! 💜

  • @_tanzil_
    @_tanzil_ Жыл бұрын

    Every other people shows one way to do things and say "there are other ways to do the same thing but I'm not going into that now", but Kevin takes time and shows almost all the possible ways, which makes him different than others and that's I like your tutorials and I never get bored watching.

  • @mitzycraft
    @mitzycraft2 жыл бұрын

    I hit an absolute wall trying to comprehend grids on the freecodecamp course and you explained this in a way that I instantly got it. Thank you 100 million times!!!!!!

  • @dixienormus8097
    @dixienormus80972 жыл бұрын

    I've been a developer for a really long time. I've always focused on the engineering side. Never paid much attention to CSS and left for designers or out sourced for it be completed. So watching this is really interesting to get a better understanding of how easy it can be to position things using grid. I don't really know the difference between flex and grid yet, but this seems like a very simple way of getting things done quickly for minimal effort. Great video.

  • @MauFerrusca
    @MauFerrusca2 жыл бұрын

    Thank you so much for providing the starting repo. Your teaching style is absolutely stellar!

  • @xClown55
    @xClown552 жыл бұрын

    Can never have enough flex/grid content, thanks for sharing

  • @eddiemilla6983
    @eddiemilla69832 жыл бұрын

    Thanks Kevin! I was always declaring rows without actually needing them, learned a lot from this video

  • @esagecantu
    @esagecantu2 жыл бұрын

    I was also completing the Front End Mentor Challenge and it is a great coincidence that you help me solve the same problem. That is why I appreciate you, Kevin.

  • @LuisReyes-zs4uk
    @LuisReyes-zs4uk2 жыл бұрын

    Kevin, your content is probably the only technical content I will watch for "leisure", when I'm eating or just chilling, taking a break. Favorite channel 🔥 Appreciate you!

  • @MatthewWeiler1984
    @MatthewWeiler19842 жыл бұрын

    Thank you so much. I generally stayed away from grid because it seemed too daunting. But your explanation really helped me :)

  • @KevinPowell

    @KevinPowell

    2 жыл бұрын

    Glad it helped!

  • @chantalwiebe534
    @chantalwiebe5342 жыл бұрын

    This is so good. I've always used flexbox because I could never wrap my brain around grid. I completely get it now. Absolutely converted. Thank you so much for this.

  • @23Kattayopp
    @23Kattayopp Жыл бұрын

    33:04 "and i'll set this up really fast" -this, Kevin, is why I simply love your each and every tutorial. because you're so thoughtful! i mean, the fact that you're thinking also about HOW we're going to consume your content, not only about WHAT you're giving us, while teaching, is amazing. thank you so much, i found you thru The Odin Project and i feel lucky that i started to build the first steps by looking at your videos:)

  • @crason8
    @crason8 Жыл бұрын

    This video was fantastic! And your naming convention is not only awesome, easy to remember, when you consider what Tailwind is doing, this makes it even easier!

  • @sprtlife6261
    @sprtlife62612 жыл бұрын

    It's incredible that this is free content. Thanks Kevin, helped me understand grids finally!

  • @ChristopherGoldenTHOF
    @ChristopherGoldenTHOF Жыл бұрын

    Thank you! I've struggled with CSS Grid and I always use flexbox instead. Your explanation was so clear and engaging. Love the channel! 👍

  • @TOMA21207
    @TOMA212072 жыл бұрын

    Great stuff man, learning a lot from you, I'm a big fan of CSS in general but this grid thing is just phenomenal. Thanks for all great tutorials.

  • @jpfaustino3269
    @jpfaustino32697 ай бұрын

    I'm just beginning to learn CSS and found your video. Your videos are clear, and your tone is engaging. Imma watch all your videos soon. Thank you for this!

  • @GabrielSouza-yy2rq
    @GabrielSouza-yy2rq Жыл бұрын

    This class was very enlightening. And your tip about setting the grid-auto-columns property was something special. Thank you very much. Greetings from Brazil

  • @terrol3164
    @terrol31642 жыл бұрын

    The explanations were so well-put that I didn't even realize the video was 37 minutes long until I finished it lol And It was super insightful to see the thought process behind when to use and when not to use certain properties!

  • @tayl5960
    @tayl59602 жыл бұрын

    I couldn't figure out what to watch on Netflix while having a break from learning layout stuff, then I saw this recommended on KZread. My brain thanks you for making learning this feel like it was still a break. You are a damn wizard.

  • @fakeitsoyoumakeit
    @fakeitsoyoumakeitАй бұрын

    after two months of struggling i've found this 💯

  • @bushigi5913
    @bushigi59132 жыл бұрын

    Even though it's a relatively long video, I finished it without skipping any part!! Thank you Kevin for this informative video!

  • @KevinPowell

    @KevinPowell

    2 жыл бұрын

    Glad it was helpful!

  • @imnemo2327

    @imnemo2327

    2 жыл бұрын

    way short for grid really that shit is so complex but well organized

  • @Baff0000

    @Baff0000

    2 жыл бұрын

    @@KevinPowell Man I just wanted to see the end result but I watched it till the end.

  • @DioD3
    @DioD32 жыл бұрын

    I'm self learning html, css and js and your videos are superb. Thank you!

  • @jornzander1285
    @jornzander12852 жыл бұрын

    This is just the best of all grid tutorials I've had so far. Mean it.

  • @rin4961
    @rin4961 Жыл бұрын

    Omg, you're explaining everything so well! I struggled to understand how the grid works but after your video, everything falls into place. Thank you, Kevin!

  • @nielsvandervelden3063
    @nielsvandervelden3063 Жыл бұрын

    I was always struggling using grid for more complex layouts but after watching your video everything becomes so easy!

  • @beaverplugins3851
    @beaverplugins38512 жыл бұрын

    Best video I've watched to date about CSS Grid. Thanks for claring things up!

  • @dannyfoo
    @dannyfoo2 жыл бұрын

    Had to leave a thank you here! Haven’t been following the development of CSS for a long time and always wondered the fascination of grid. Now I know!

  • @mirvids5036
    @mirvids50362 жыл бұрын

    I loved grid from the first time I saw a seminar on it a few years ago. I thought it made all other options redundant yet they seem to persist like flex, bootstrap etc. This video is just excellent and reaffirms my original view. Thanks !

  • @minhanh0604

    @minhanh0604

    2 жыл бұрын

    I am think so, as well.

  • @rolandoriley
    @rolandoriley Жыл бұрын

    Just an excellent explanation to get started with Grid. There are so many details on this lesson that is worth to take your time when following along with Kevin

  • @TheSoulCrisis
    @TheSoulCrisis Жыл бұрын

    This video on Grid is amazing, your Flex ones are awesome too!! Loving this to bits, diving deep into these rich feature sets and need lots of practice!

  • @Sorcy
    @Sorcy2 жыл бұрын

    Wow, I really never was a big fan of grid, found it way to complex, always went back to flex box, but this video really made it pop for me. Great job!

  • @KevinPowell

    @KevinPowell

    2 жыл бұрын

    Great to hear and happy that you liked it!

  • @dannyyang9181
    @dannyyang9181 Жыл бұрын

    I always come back to this video when I need a quick refresher on css grid. Thanks Kevin!

  • @fredoscott2346
    @fredoscott2346 Жыл бұрын

    You DEFINITELY have the best CSS tuts in the world! :) EDIT: You also have a really comfortable and relaxing personality that makes it easier to follow along. Your videos are not too slow and not too fast. As a tutor (and person) I will give you 10/10.

  • @sahildas.

    @sahildas.

    Жыл бұрын

    give him an 19/10

  • @johnpaulpineda2476
    @johnpaulpineda24762 жыл бұрын

    Just saw this vid. The grid-template-area are so life-changing. Thank you so much Kevs!

  • @in91gaming15
    @in91gaming152 жыл бұрын

    Probably the best video I’ve ever seen of grid layout! Thanks man ❤️

  • @Baraka0369
    @Baraka0369 Жыл бұрын

    Out of no where, you delivered me from the hell. The best css grid tuto ever

  • @MarsIfeanyi
    @MarsIfeanyi Жыл бұрын

    Your awesome explanations and rough sketch of the grid system has did a great magic for me in understanding CSS grid... The use of grid-area makes the whole process easier... This is Gem

  • @The-Sentinel
    @The-Sentinel Жыл бұрын

    one of the best grid video examples ive seen yet. It fits perfect for something like testimonials

  • @MarkusRappat
    @MarkusRappat Жыл бұрын

    Kevin, I'm learning all this CSS stuff for my own project and I was fighting for weeks with my grids. I watched your video at 4 am in my bed and just solved all problems... Thank you

  • @raftguy1376
    @raftguy1376 Жыл бұрын

    Man, this helped a lot as someone learning from scratch. Realized i was struggling to wrangle flex box to do stuff i should have used grid for. Thanks!

  • @jisrite
    @jisrite2 жыл бұрын

    Watching KZread videos really do make you learn something that you didn't even intend on learning. Before, I thought you were not able to have two classes in one element. As I watched more of Kevin Powell and Web Dev simplified, I notice that they have a very LONG class names and I thought it was because they were using some kind of extensions in order for them to do that, but I looked it up recently and....you CAN add more than one classes in an element by using space as the indicator. A very beginner mistake you could say, but I am very glad I learned that early on.

  • @spydergs07
    @spydergs072 жыл бұрын

    I just really started learning grid, so this video is awesome to really get the info needed to get into it. Thank you!

  • @darraghhayes6015
    @darraghhayes60152 жыл бұрын

    What an amazing tutorial. Have never felt more like I know how to control the grid system. The tutorial makes it so clear that I felt stupid for not understanding before.

  • @jbsinluenam
    @jbsinluenam2 жыл бұрын

    Wow! Waiting for this. Thanks, Kevin.

  • @Alex.Shalda
    @Alex.Shalda Жыл бұрын

    Absolutely exhaustive and thorough explanation, what a magic!

  • @scoworthyuan
    @scoworthyuan Жыл бұрын

    Kevin your technique really sheds light on how to use the grid, many thanks for this detailed explanation!

  • @gsonego
    @gsonego8 ай бұрын

    What a lesson! Amazing how simple this is. Thank you for sharing!

  • @fabianpetersen2452
    @fabianpetersen24522 жыл бұрын

    Wow, well done Kevin. I'm still a newbie and trying to learn as much as I can by navigating the web for additional content while i do my bootcamp. You are the best, had to subscribe to learn more 👌

  • @gangjira
    @gangjira2 жыл бұрын

    Lol I've been binge watching all of your grid videos the past couple days. Such a huge pleasant surpise! Ty ty

  • @0-Will-0
    @0-Will-02 жыл бұрын

    Great video as always KP. Have been enjoying your other grid videos and this is the icing on the cake. I'm already dividing said cake into template areas in my head. This channel and Jen's layout land has been so helpful for learning grid (plus all the other stuff you cover is brilliant too).

  • @0-Will-0

    @0-Will-0

    2 жыл бұрын

    PS. As a suggestion, I wondered if you have considered taking line numbers, side toolbar, code zoom etc. off your editor, just to give a little more room when coding alongside a layout on a video.

  • @clevermissfox
    @clevermissfox9 ай бұрын

    This is brilliant. Thank you so much i will be rewatching when i can follow along. Had a project yesterday where i needed grid and now i have a much better understanding of it. ❤

  • @jgvlc
    @jgvlc2 жыл бұрын

    Thank you very much, you have synthesized very well what is necessary to apply css grid in our layouts, your content is gold!

  • @nickperkinsbogota
    @nickperkinsbogota Жыл бұрын

    Thank you for existing! I discovered your channel quite recently, and your calm, informative and accessible tutorials have helped me finally get to grips with responsive design and so much more!

  • @rajeshsingh-mv7zn

    @rajeshsingh-mv7zn

    Жыл бұрын

    what's showing in your comment ?

  • @vdjayaram5053

    @vdjayaram5053

    Жыл бұрын

    @@rajeshsingh-mv7zn donation

  • @KevinPowell

    @KevinPowell

    Жыл бұрын

    Thank you so much (and sorry for missing this until now!)

  • @flaminggasolineinthedarkne4
    @flaminggasolineinthedarkne42 жыл бұрын

    @Kevin Powell. I want to say thank you Kevin for the easy grid layout instruction tutorial. Please make a video like this for the sub-grid as well so that we can grasp the concept of sub-grid easily.

  • @mellowmarvin
    @mellowmarvin2 жыл бұрын

    Such a great Video! I've struggled so long with grid and now i'm starting to get it! Thank You so much :)

  • @hqprivat
    @hqprivat7 ай бұрын

    Wow, so much I have learned in this short video! I really enjoyed it! Thank you very much, Kevin!

  • @ngoako
    @ngoako2 жыл бұрын

    I was just thinking of re-learning CSS grid. Perfect timing.

  • @phillipmeredith6101
    @phillipmeredith6101 Жыл бұрын

    Man! I'm so glad I found your channel. You're videos are great! Thank you and keep up the good work.

  • @nurullohubaydullayev5413
    @nurullohubaydullayev54132 жыл бұрын

    Thank you very much. This video was much better and clearer than the others ’ lessons.

  • @tomg55555
    @tomg555557 ай бұрын

    I'm not really into commentating videos but man, I'm improoving my skills has I never did before because of your content. Thank yoou very much!

  • @blackpanda5093
    @blackpanda50932 жыл бұрын

    I finally understand CSS Grid and i love it - thank you Kevin Powerll.

  • @e.m.janssen3638
    @e.m.janssen3638 Жыл бұрын

    Super clear and easy to follow, thanks as always for the awesome tutorials.

  • @secretskpg
    @secretskpgАй бұрын

    Hello Kevin, While this is one of the few comments I've ever made on KZread, your channel has compelled me to express my gratitude. I am transitioning into software development with a focus initially on back-end processes, viewing them as more aligned with my logical mindset. However, your insightful explanations have piqued my interest in front-end development. I now appreciate the significant logical components involved in HTML and CSS. Thank you for the enlightening content; it's invaluable to have access to such informative resources as I explore this field. I feel extremely grateful!

  • @jasoncabreros
    @jasoncabreros7 ай бұрын

    Been enjoying your videos. Easy to follow and understand and the fog of not knowing is being lifted. Thanks!

  • @michaelm8044
    @michaelm8044 Жыл бұрын

    Thanks for covering all bases in terms of responsiveness, shorthand, overwriting potential, and so on.

  • @CazCreates
    @CazCreates2 жыл бұрын

    Really great explanation of CSS grid, Kevin! Thank you ❤️

  • @Tech-tion55
    @Tech-tion552 жыл бұрын

    I was totally confused about declaring the grid-template-column & grid-template-row property.... this really really helped me thank's a lot sir :)

  • @kbCorruption
    @kbCorruptionАй бұрын

    You are the CSS noob whisperer. I have been learning on my own, struggling with CSS layouts until I came across a random reddit thread recommending your channel. What a gift of fate! Thank you for your content!

  • @thetrailhunter4469
    @thetrailhunter44698 ай бұрын

    Best CSS channel ever. Thanks, Kevin!

  • @markxavior
    @markxavior6 ай бұрын

    This is the best tutorial for grid. One stop video. Thanks Kevin 😊.

  • @informativeworldforyou7562
    @informativeworldforyou756210 ай бұрын

    I was a absolute beginner to the grid system but this man made things simpler thanks

  • @loudwirefarm5795
    @loudwirefarm5795 Жыл бұрын

    You've taught me more about css in the two months I've been checking out your videos than ITT Tech did in two years. True story. And I always had a web class as an elective LOL

  • @Karaz608
    @Karaz6082 жыл бұрын

    I spent a whole day learning and memorizing. thank u so much your lessons are valuable and appreciated. we love u, sir.

  • @codigo6273
    @codigo6273 Жыл бұрын

    Worth watching, thanks @Kevin Powell.

  • @atomz520
    @atomz520 Жыл бұрын

    Very informative and easy to follow along. Thanks for being so clear with the tutorial!

  • @anjakalem9159
    @anjakalem91592 жыл бұрын

    Thank You Kevin for being such an amazing teacher!

  • @henrimiti
    @henrimiti8 ай бұрын

    this is one of the best tutorials i've ever seen on youtube. thank you soooo much.

  • @georgesaitdev
    @georgesaitdev Жыл бұрын

    Dear Kevin, I'm lost for words and maybe a tad bit emotional. Grid is there almost for like 5 years now and I never took a moment to figure it out. Working at a big company we had teams to set out layout systems constantly, so I never had to do that. This in combination of having a family really made my job as a frontender just a job whereas it started in 2010s as a hobby. Now with your videos making it simple and elegant I'm really getting my early days vibe back. Back in the day with floating and clearfixes this is what we wanted.! I'm sorry for a comment that looks more like a email now. But thank you, you really made my day!

  • @rtsemensato
    @rtsemensato Жыл бұрын

    Best video about display grid on the internet. Thank you very much for this exceptional content!

  • @abbosshomurodov8964
    @abbosshomurodov89642 жыл бұрын

    Thank you so much Kevin. You helped me a lot with understanding the weird parts of grid. You are the best!!!

  • @ricardodesirat2590
    @ricardodesirat25902 жыл бұрын

    Great video, Kevin! I also love grid. Specialy with grid-template-areas! I separate them with tabs instead of spaces. It's a bit more organized in messy names :)

  • @mikeshaw4610
    @mikeshaw46106 ай бұрын

    Starting to use grid. This has been very helpful. I say a couple other video's but you cover what/why is simple terms very good.

  • @glynislily
    @glynislily4 ай бұрын

    I have been struggling with this. OMG you made it so simple. I'm adding your videos to my studying!

  • @cesarpoumian5585
    @cesarpoumian55854 ай бұрын

    I'm just so glad I have invested in Kevin's amazing courses. Thank you sir!

  • @nathalieferreiraBR
    @nathalieferreiraBR2 жыл бұрын

    absolutely loved it!! thanks for sharing with us

  • @Lorkisen
    @Lorkisen Жыл бұрын

    Thank you for the tutorial, I've been avoiding Grid because it seemed a lot more complicated than Flex, but your tutorial is very approachable and useful use cases for grid.

  • @silasowu4502
    @silasowu4502 Жыл бұрын

    Kevin!!🤩🤩, You have made my day. How you taught CSS grid and how I understood it, saved .......some headaches🤯🤩. Kevin, you did it. Thank you, Senior Developer