CSS Grid vs Flexbox

Поделиться
HTML-код
  • Опубликовано: 24 янв 2025

Комментарии • 283

  • @Oli-bm1ee
    @Oli-bm1ee 4 года назад +37

    This! This guy deserves a medal! I literally have a template now, where I can apply all my other learning and it all make sense! Absolutely amazing that this is free and in a little over 10 minutes you've blown my mind! Thank you so much! :)

  • @Skyflairl2p
    @Skyflairl2p 2 года назад +4

    Im a student of front end development and have been banging my head over something i knew was simple, yet couldn't wrap my head around for about two weeks straight now.
    All the other tutorials ive seen have just been comparing the two, when using them together makes just far.. FAR more sense. You've just saved me a headache and a half, I was able to sort out my design properly now. Thank you!

    • @astrodians
      @astrodians Месяц назад

      i like it when they explain it with a common usecase in the real projects. It's easier to see what's the usage of something really is with little to no misunderstanding.

  • @wildelyssa
    @wildelyssa 5 лет назад +45

    I'm just learning both and wondering what the difference was between them, this is a great explanation. Thanks!

    • @ijustdey
      @ijustdey 4 года назад

      I’m about to start learning, which is better?

    • @monair3263
      @monair3263 4 года назад +2

      @@ijustdey U should learn both

    • @XlON___
      @XlON___ 3 года назад

      Were you able to learn anything after one year?

    • @lysaunku-jones8587
      @lysaunku-jones8587 3 года назад +2

      Definitely learn both. They are both useful for different things, and different types of layouts. Learning how to use them together will open up a lot of possibilities. Hope your learning is going well!

    • @lysaunku-jones8587
      @lysaunku-jones8587 3 года назад +1

      At the time, I mainly was getting confused choosing the best one for different situations. The video made that very clear for me.
      I find css tricks cheat sheets a useful link. I still check them now and again as a refresher.
      css-tricks.com/snippets/css/a-guide-to-flexbox/
      css-tricks.com/snippets/css/complete-guide-grid/

  • @easazade
    @easazade 5 лет назад +8

    every time i watch your comparison videos, i think . wow no one else could put it like that. keep up the great work

    • @academind
      @academind  5 лет назад +1

      Happy to read that Alireza, thanks a lot!

  • @Andrey-il8rh
    @Andrey-il8rh 6 лет назад +7

    Sometimes I think you are reading my mind! A question bumps in my head and in 30 minutes I receive a video answer from Max, this is fantastic! :)

    • @academind
      @academind  6 лет назад

      Haha, that's so cool to read, always happy to create videos which make you guys happy :)

  • @saeedjalali7339
    @saeedjalali7339 2 года назад +1

    i mean whenever i wanna learn something new in front-end i just add Academind at the end of the subject in search box and boom ! 20 minutes later it's done.

  • @jcribbs5819
    @jcribbs5819 2 года назад

    This is the best explanation of grid and flex that I have found omg.. Like the dude said below it's a template. my mind is blown too. I had never even heard of grid-area. wow.. Thank you so much. You'll be seeing me in your CSS class.
    I went through this really slow and made my own html and css file for future reference. This really is a game changer. I was so confused until I saw this video.

  • @abbyck
    @abbyck 5 лет назад

    Max! After all these years, I still couldn't find some other person other than you, who can explain things like this.

    • @academind
      @academind  5 лет назад +1

      Wow that is so great to read Abhinav, thank you very much for your support!

  • @ruppelllost7546
    @ruppelllost7546 4 года назад +4

    Your explanation was just perfect, I was so confused as to what CSS grid and CSS flexbox were before. Thanks a lot!!

  • @蝦子-n6u
    @蝦子-n6u 5 лет назад +12

    Didn't expect that an English video can make me understand well like this :)

  • @sm810403
    @sm810403 4 года назад +6

    thank you! I will use Grid for general layout and flexbox for detail, then.

  • @kavithakesavan8938
    @kavithakesavan8938 3 года назад

    The moment I see the video from "Academind ", I knew this is where my search ends . Max a great instructor online . Short and Clarity Content delivery .Thank You Max :)

  • @prakashupadhyay9529
    @prakashupadhyay9529 4 года назад +1

    It was your video on ReactJS back in 2018..that I picked-up front-end (reactjs) and now it's all I do as a Full-Stack dev.. you're incredible at engaging the students. Thanks a lot for everything you share! :)

  • @pedroelton7040
    @pedroelton7040 4 года назад +2

    The very best tutorial I’ve seen so far. Finally I understood it perfectly! Tks!!!

  • @BlueyMcPhluey
    @BlueyMcPhluey 5 лет назад

    I like how the worked example showed the strengths of both very clearly and succinctly

  • @Pareshbpatel
    @Pareshbpatel 3 года назад +1

    Very useful and clear tutorial on CSS-Grid and Flexbox usage. Thank you.
    {2022-01-03}

  • @reristavi
    @reristavi 6 лет назад +5

    I was actually working on it last 2 days now. Yeah combining them together makes so much more sense. In fact I have to admit that building my own CSS styles makes my life so much easier then Bootstrap and other frameworks.
    Thanks for a nice Video.

    • @academind
      @academind  6 лет назад

      Thanks for the nice feedback, I'm glad you liked it!

    • @123kingvlad
      @123kingvlad 6 лет назад

      is it okay for a beginner to learn both at the same time? I now know the box model and have watched already the CSS flex box from Academind here in YT but I still need to practice it more

  • @cyonii8683
    @cyonii8683 4 года назад

    For the first time after so many attempts, I have finally got it. You're always the man, thank you.

  • @RajPhotoEditingMuchMore
    @RajPhotoEditingMuchMore 3 года назад +12

    Thanks a lot sir 🙂🙏🙏

  • @krnkoravi
    @krnkoravi 4 года назад +1

    Grid template area is most magical thing I have seen in CSS

  • @mariom4173
    @mariom4173 2 года назад

    This video was very helpful. It helped me to understand better the use of Grid/Flexbox. I'm sure I'll be watching it again and again when needed.

  • @TropicalTaquito
    @TropicalTaquito 6 лет назад +2

    Taking your CSS course on udemy and I’m on the CSS grid section and I enjoy it a lot more than flex box. I find it straight forward, especially with the grid-template-areas property.

    • @academind
      @academind  6 лет назад

      Great to have you on board of the course, thank you for your support! I also like the Grid a lot, but I think that knowing both Flexbox and Grid can be quite helpful, especially in situations where we combine both :)

    • @Toulkun
      @Toulkun 6 лет назад

      Tropical Taquito Exactly, the more i use css grid more i love it. But i use flex for inner elements sometimes.

  • @deepdive1338
    @deepdive1338 4 года назад +1

    Other useful properties with flex, position-items(set it to center for vertical and horizontal centering, and justify-wrap:wrap which will add some foundational responsiveness like wrapping to next line when run out of space

  • @kallege01
    @kallege01 2 года назад

    thanx bro i took this up on myself and i'm going crazy...
    but this makes me get a little better understanding of why things are always all over the place on my webpages...

  • @thewu32
    @thewu32 4 года назад

    Waow!!! That's the best tutorial I ever seen about the famous Grid vs Flex topic!!! Very well explained! Thx a lot.

  • @converter
    @converter 5 лет назад +41

    I was like .. what's "jabber"??? oh, "each other!"

    • @BenHayat
      @BenHayat 4 года назад +1

      He DID say jabber several times... :-)

    • @stolensentience
      @stolensentience 4 года назад

      I’m glad you noticed each jabber

  • @AliBaba-hn8tv
    @AliBaba-hn8tv 4 года назад +2

    I love your take on this subject, you solved my problem and saved me time. Thank you.

  • @deepthis4956
    @deepthis4956 4 года назад +2

    Thank you! I really needed this video to decrypt the grid layout.

  • @justdoodleit311
    @justdoodleit311 3 года назад

    wow!! short and crisp to the point thanks a lot

  • @samir105yt
    @samir105yt 5 лет назад +4

    The best simple explanation!

    • @liamik9986
      @liamik9986 5 лет назад

      agree! super explanation

  • @pratikswvk
    @pratikswvk 4 года назад +2

    Awesome Max, you are the best teacher in the whole world😊 Hope you and your family is safe😊

  • @axelblaze3361
    @axelblaze3361 5 лет назад

    I always confuse in flexbox and grids but after watching your video all my doubts are clear.

  • @tonymora8586
    @tonymora8586 4 года назад +1

    Great video
    I hope someone can answer this question, how could I put the footer at the bottom of the page?

  • @PrecizionHunting
    @PrecizionHunting 5 лет назад

    Nice explanation! Helped a lot and actually answered questions I had that I did not think would be answered in this video. Keep it up!

    • @academind
      @academind  5 лет назад

      Happy to read that, thank you!

  • @nehoha
    @nehoha 3 года назад

    This is an awesome simple explanation of how it works! Thanks, man!

  • @cswalker21
    @cswalker21 4 года назад +1

    Wow. I'm really glad I watched this video. I had this idea in my mind you pick one or the other. It makes sense to use each one for things it is good at. Thanks!

  • @daguttt
    @daguttt 3 года назад +1

    The video i was looking for. Perfect!
    Nice explanation. Thank you so much!

  • @sauliustb
    @sauliustb 4 года назад

    thank you sooo much. I was thinking on how to achieve my layout, and had it almost completely done in flexbox. Then I changed something and my headers didn't align anymore.
    Now I'm going to see if I can do the main layout in grid first, and some finetuning with flexbox. should save me a whole lot on actual CSS code to go through.

  • @omikaayush
    @omikaayush 4 года назад

    U r really awesome ..... its going so smooth that I did not hv to make much effort to understand:)

  • @randychoc7
    @randychoc7 5 лет назад +2

    First video of the list... and perfect 👨🏻‍💻👍🏻

  • @itsm3dud39
    @itsm3dud39 4 года назад

    Im going to learn grid and flexbox and this is a warm up video for me. Nice

  • @marcosandoval7260
    @marcosandoval7260 5 лет назад

    Wow. Excellent video as always. Easy to understand the core ideas and fully practical. Thanks Max.

  • @yldrmhakansavc8971
    @yldrmhakansavc8971 2 года назад

    That was a very good way to teach that! Simple but full of information!

  • @sougataghar1179
    @sougataghar1179 5 лет назад +1

    i learned grid 1st , thank you so much . I will now use both from now on.

  • @DUANEYAISER
    @DUANEYAISER 6 лет назад +5

    I was in the middle of watching your other Flexbox/Grid videos when this popped up. Stop producing for a week or two, I CAN'T KEEP UP! :-)

    • @academind
      @academind  6 лет назад +6

      Sorry Duane, there are just so many interesting topics to cover :D

  • @michelbilliau3760
    @michelbilliau3760 3 года назад

    I'm very new to this but this is a great video ! It explains the difference very well ! Well done !

  • @madarafayssal
    @madarafayssal 4 года назад

    hello sir thanks for you cours and languge it's help me to understand what is grid and how it's work

  • @gkathmandu
    @gkathmandu 4 года назад

    this is one of v important advance css practical lesson. Be careful on is part('grid-area:main;') as its not mentioned in video, there is not quotation marks for 'main' which we are used to. Im saying becoz , ive spend 2hrs in this thinking what got wrong.

  • @aznanramin972
    @aznanramin972 4 года назад

    Unbeleivable Lecture,GOD BLESS YOU.MD.CHOWDHURY,Bangladesh.

  • @romualdomariano1457
    @romualdomariano1457 3 года назад

    Yep. This is not recommended. I really search for this. Nice video. Intuitive 💯

  • @pranit_7D
    @pranit_7D 4 года назад

    I love the video. Made it seem so much simpler. Keep up the good work.

  • @sarthaksj1999
    @sarthaksj1999 4 года назад

    Absolutely phenomenal video. Great Work Buddy....

  • @bryannchude4559
    @bryannchude4559 4 года назад

    Thanks man. Your explanation has been really helpful.

  • @zakaria1859
    @zakaria1859 4 года назад +4

    This video was really helpful for me, thank you, now i understand.

  • @maskman4821
    @maskman4821 6 лет назад

    This is a fantastic intro course on css grid and flexbox!!!

  • @mansaha9288
    @mansaha9288 5 лет назад

    I wish you could show the example of “overkill” you mentioned about using grid in one-dimentional situation where flexbox is more appropriate.

  • @luismunoz9126
    @luismunoz9126 4 года назад

    this is the best tutorial ever.... simple and powerfull

  • @azrailnone
    @azrailnone 4 года назад

    I have created a footer and inside there I have a div class with 2 divs ( icons with my icons 4 of them in total and a div class=copy with a copyright in it ) I added a dsiplay:flex to my div container which includes the above two divs but I cannot seem to get how to position my icons in the middle and my copyright at the end of my footer.

  • @jakemurdock5376
    @jakemurdock5376 2 года назад

    Loved this! This really helped me! Thank you :D

  • @Ben-ui5sc
    @Ben-ui5sc 6 лет назад

    wow, that was the perfect explanation to the googled question of grid or flexbox -- combination it is, cool! thanks, subbed.

    • @academind
      @academind  6 лет назад

      Thank YOU so much Ben - welcome on board of the channel :)

  • @digigoliath
    @digigoliath 5 лет назад

    Great stuff & very well explained even for a newbie. Totally enjoyed the video. Thank you very much!!

    • @academind
      @academind  5 лет назад +1

      Thank YOU for your awesome feedback!

  • @samuelsantana2109
    @samuelsantana2109 3 года назад

    Great explanation i perfectly understood it. Thanks u so much

  • @ramiechaarani6947
    @ramiechaarani6947 2 года назад

    This video is amazingly helpful

  • @turkey8042
    @turkey8042 2 года назад

    Great explanation! Thanks for the vid!

  • @mushfikf.rahman9700
    @mushfikf.rahman9700 3 года назад

    Really helpful for beginners like me

  • @alokranjan476
    @alokranjan476 5 лет назад

    Thanks
    Very well explained the difference Max.
    Please keep posting such informative contents.

    • @academind
      @academind  5 лет назад +1

      Happy to read that you like it Alok, I'll do my best to keep it going :)

  • @barklegneeshetu8048
    @barklegneeshetu8048 4 года назад +1

    This is what I needed, thanks Max

  • @KuldeepKumar-qc6fz
    @KuldeepKumar-qc6fz 3 года назад

    We no need to use margin with flex and grid because there is a way to make spacing using column-gap: 1em; and same for the row spacing
    column-row: 1rem;

  • @tebogoikaneng727
    @tebogoikaneng727 3 года назад

    much appreciated... I've been looking for this knowledge....

  • @WateryIce54321
    @WateryIce54321 6 лет назад +1

    What's something Flexbox can do that Grid (reasonably) can't? There's also power in having a few well-defined tools.

  • @eswar9255
    @eswar9255 4 года назад +2

    you got a new subscriber. Congrats that's me ✨🎉🎇🎇🎆

  • @nikkotolentino553
    @nikkotolentino553 4 года назад

    This enlightens me. Thanks for this wonderful video :)

  • @amburt7x
    @amburt7x 4 года назад +5

    Thank you, this is helpful

  • @steffen_storck
    @steffen_storck 6 лет назад

    a big point is, that internet explorer does not support css grid. and many big companies still use it as default browsers (yes, the number is declining. but still...), so by using grid, the hompeage might look like crap in many many many browsers :-)

    • @academind
      @academind  6 лет назад

      That is absolutely true, browser support is something you have to check when using the Grid.

  • @DaggieBlanqx
    @DaggieBlanqx 4 года назад

    Wow! great explanation .

  • @Alt-wx6ry
    @Alt-wx6ry 4 года назад +1

    Nice explained, thanks for the video :)

  • @jkli14
    @jkli14 4 года назад

    how do I get the footer to go at the bottom of the page ?

  • @SlowparSheena
    @SlowparSheena 6 лет назад

    Wow. So you just broke that down in this short video more plainly than another training course that I paid for...LOL!!!

    • @academind
      @academind  6 лет назад

      Happy to read that the video was that helpful for you, thanks a lot :)

  • @НЕЮТУБЪ-м3в
    @НЕЮТУБЪ-м3в 4 года назад

    You saved my life!! Thank you!!!

  • @jozefrzadkosz5945
    @jozefrzadkosz5945 4 года назад

    Flex-direction: row is set by default ;)

  • @africainwolf7342
    @africainwolf7342 4 года назад

    This was so helpful, Thanks

  • @JoaoFerreirajf
    @JoaoFerreirajf 2 года назад

    Great video, really really helpfull. Thank you so much

  • @LethalDamageGaming
    @LethalDamageGaming 5 лет назад

    amazing, you helped me understand a few things. Also, no one in this world say "each other" like you do =)

    • @academind
      @academind  5 лет назад +1

      That's just great to read, thanks a lot for your comment!

  • @zlatkozeco7951
    @zlatkozeco7951 4 года назад +1

    Thanks, this was very helpful

  • @vaibhavm1986
    @vaibhavm1986 6 лет назад

    Always fun and simple explanation, so easy to quickly understand, thanks a lot
    Only obstacle at the moment with grid is IE :( wish IE should not exist anymore

    • @academind
      @academind  6 лет назад +1

      Thank you very much for your comment Vaibhav. Yes, browser compatibility with the IE is not perfect yet, let's see if it gets better in the future.

  • @hleet
    @hleet 4 года назад

    superb example, as always, the best

  • @wojciechjarosz420
    @wojciechjarosz420 4 года назад +1

    Amazing job guys!!!

  • @sureshmakwana8709
    @sureshmakwana8709 3 года назад

    Wow so useful 💯💯💯💯💯 thankyou!

  • @quamar0313
    @quamar0313 6 лет назад +3

    Thanks

  • @Glebtc
    @Glebtc 4 года назад

    nice summary, thank you

  • @taukirahmed9714
    @taukirahmed9714 3 года назад

    thanks for this super helpful video

  • @azrailnone
    @azrailnone 4 года назад

    How can I apply different positioning at more than 1 element inside a grid area with flex display on it, for example I have a footer and inside I want my icons be in the midldle but my copyright be at then far right??

  • @dean6046
    @dean6046 5 лет назад

    Thank you Max. Well said and well explained!

    • @academind
      @academind  5 лет назад

      Happy to read that, thank you!

  • @OrhanPOLATMasters
    @OrhanPOLATMasters 6 лет назад

    You are an awesome teacher, thanks.

    • @academind
      @academind  6 лет назад

      Thank you so much Orhan, it really means a lot to me to read that :)

  • @xstanley999
    @xstanley999 4 года назад

    can pure css 3 replace other library such as bootstrap only for grid layouts ? although I think I will still use Bootstrap Components such as Button or alert to combine it

  • @asefhosseini3007
    @asefhosseini3007 3 года назад

    why don't you use `gap` property for adding space between items?

  • @Erick-ct1tz
    @Erick-ct1tz 4 года назад

    Im new with Flexbox and Grid, I always made my design in the old way using floats, I never used grid or flexbox before because i thought it will be hard, but men, your video explain it so good that now I will start using this properties on my designs and forget about positioning all with floats, line heights and margins.
    I just have one question, what's the software you use to code in this video? I use dreamweaver, but want to try something different, and that software looks nice

    • @kamel3d
      @kamel3d 4 года назад

      use Vscode it is the best for now

  • @BenHayat
    @BenHayat 4 года назад

    Max has a special way to get a point across.

  • @jaleele7168
    @jaleele7168 5 лет назад

    so for general layout use grid and for specific changes uses flexbox on the elements in the grid ?

  • @haroldmcbroom7807
    @haroldmcbroom7807 3 года назад

    What program are you using in this video to write your code?