Do you understand how Flexbox does what it does?

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

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

  • @DesignCourse
    @DesignCourse 3 года назад +539

    I always thought it just does what it does because it be what it do. 🥃

  • @JaredNichols909
    @JaredNichols909 3 года назад +254

    I love how you explain **why** things behave / function the way they do. A lot of instructors just tell you a few things to do or try and then you run into problems in the real world, like you mentioned. I like that you care about your audience enough to give comprehensive instruction and explanation of why something is the way it is. You’re a teacher that makes it easy to follow along. Good job!

    • @KevinPowell
      @KevinPowell  3 года назад +10

      Thanks so much!

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

      My thoughts exactly.

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

      Kevin is definitely a thorough teacher.

  • @RenrenKlein
    @RenrenKlein 3 года назад +33

    I work as a developer and I swear the tips and tricks I learn from your videos are invaluable keep it up. Other than Stackoverflow your one of my first go to destinations.

  • @dinckelman
    @dinckelman 3 года назад +5

    I am absolutely in love with this channel. This is how teaching should be done. You take an issue, you explain why it's an issue, and you teach a solution, and explain why that works too. Absolutely brilliant

  • @KevinPowell
    @KevinPowell  3 года назад +17

    If you'd like to really dive into flexbox and learn the ins and outs of it and make creating layouts a breeze: flexboxsimplified.com

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

      Hey Kevin, are you also planing on launching gridsimplified?

    • @KevinPowell
      @KevinPowell  3 года назад +2

      @@josecabana3d eventually, yup. Have some other things first, bit its in the plans!

  • @lo-tar1442
    @lo-tar1442 3 года назад +23

    Ok guys here's what you need to know... Give your parent element that contains your children the property display: flex; & flex-direction: row;
    Then give your children the property flex-grow: 1; and like magic you have yourself a pretty solid flexbox layout. CSS is life CSS is love :)

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

      So I've been trying to do something like this with images, but I'm finding that the images aren't responding well to the flex-box grow property. (I'm trying to have one image take up 2/3 of the width of the page, and the other image 1/3, but flex-grow isn't making it work. However, I got my desired look by using a width of 200% on one image, and width 100% on the other...) Any idea why the flexbox grow property isn't cooperating with images?

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

      ​@@Nicklefritz if you set flex-basis:0 for your children and then give flex-grow they work correctly.

  • @redwoodJB
    @redwoodJB Год назад

    Still coming back to your videos from a year ago and they're still saving my butt. You make CSS so easy to understand and best of all how best to organize it.

  • @joan-mariacbrooks
    @joan-mariacbrooks Год назад +1

    I'm in the FreeCodeCamp coding program at my local library and I found your tutorials on RUclips; you have no idea how helpful your videos are so please, don't stop doing them! I've told 3 of my classmates about your videos so I'm pretty sure they're finding them helpful as well. Thanks for explaining things so clearly!

  • @HorizonHuntxr
    @HorizonHuntxr 3 года назад +20

    Father has blessed us with another 🔥 video. Much love!

  • @ינוןאלבז-כ1ז
    @ינוןאלבז-כ1ז 3 года назад

    With you never disappointing you can always find the most advanced topics in CSS

  • @kang_prabh
    @kang_prabh 3 года назад +7

    I stumbled upon your channel accidentally and man !! you talk about real stuff

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

      Welcome, and glad that you're enjoying my content!

  • @vibonacci
    @vibonacci 3 года назад +34

    "The nice thing about flexbox is that it is flexible."

  • @chrispfaff720
    @chrispfaff720 3 года назад +2

    Kevin, please don't stop doing what you do. As someone who is coming from the backend and trying to move to the frontend, I love your videos because they are so quick and informative.

  • @FilipeFreire
    @FilipeFreire 3 года назад +50

    The "flex-wrap" can save you some media queries once in a while too! =) Awesome video as always Kevin, really appreciate it!

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

      hell yea also don’t forget flex-shrink and flex-grow!

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

      But would flex-wrap work with width 100% ??

    • @rajarorauk
      @rajarorauk 8 месяцев назад

      @@ScopedMach1neyou could clamp the width so that it has a minimum and then flex wrap.

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

    Thank God I found your channel. Im new to front end and was having a hard time with flex box and things overflowing and not aligning correctly and the way you explain things helped me understand how to get it fixed. Keep up the great work!

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

    This lesson shows that every problem has a simple solution. Thanks a lot

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

    It's amazing that I've been using flexbox for so long and never stopped to think *why* it does what it does. Brilliant video! Thanks.

    • @KevinPowell
      @KevinPowell  3 года назад +2

      Same here to be honest. One of the fun things about teaching things is you end up figuring out much more how they work, lol. Then I get to share that, and hopefully it helps :)

  • @guillermoandradaFSD
    @guillermoandradaFSD 3 года назад +2

    Kevin, once again you break the whole! It's so easy to understand when you explain it like that. Thank you so much, dude.
    🤯🤗

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

    You are CSS god to me, the way you explain everything. I loved it. It's like got teaching us about life.

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

    Thank you Kevin for all of the helpful videos.
    I now understand how flex-boxes actually shrink.
    The 100% width also makes sense now.

  • @stefanionescu9881
    @stefanionescu9881 3 года назад +5

    Kevin honestly since stumbling upon your channel my life has changed for the better. After a pause of 6 years I fell in love with CSS again.

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

    Excellent stuffs as usual. Love how you explain "why" first than the usual "how to fix it". Applies for all of your videos.

  • @Ctrl_Alt_Elite
    @Ctrl_Alt_Elite 3 года назад +2

    For anything design or CSS related, I always check if you have a video on it before googling ❤ guaranteed top quality! Keep up the great work as always 😁

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

    I've been working on making a browser extension originally written for Chrome work across all browsers.
    And actually learning why properties be what they be has sped up that process tremendously.
    Thank you so much!

  • @usmansohail8907
    @usmansohail8907 3 года назад +2

    whenever we face problem in design the only one question rises "why this happening". you just gave the answer. 💗🦉

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

    Was using for arranging elements exactly centered for almost 3 years and never understood properly. Hats off to you Kevin! Looking forward to see more of flex box videos. Lots of love from 🇮🇳

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

    Best CSS teacher on RUclips, thank you so much 👍

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

    Very good tip! I will use it this monday morning. I did not know the "gap" word before your video. Philippe P.

  • @goldenekpendu
    @goldenekpendu 3 года назад +3

    Flex has flexed my brain beyond measure...no jokes. Thanks a lot for this video

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

    Thank you Kevin Sir. Good Job. Really worth taking Lessons

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

    That explains so much so eloquently, thanks!

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

    If you have enjoyed? Come on Kevin, enjoy is such a small word, it has made me happier in life as a whole.

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

    Thank you Keving. I feel that you give me motivation to continue learning in a welcoming atmosphere. I am slowly moving career from app rudimentary functional development to app design and user exprience UX/UI. i am so happy to follow your videos.

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

    Thanks for a great video and explanation! More "Why" videos please! It's the best way to learn!

  • @mchepen
    @mchepen Год назад

    im studying for full stack and i appreciate your videos soooo much

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

    Sometimes it has a mind of it's own is so true. No matter how comfortable you get with it it can still just be odd at times.

  • @corwins404
    @corwins404 3 года назад +2

    I was expecting to know a bit more about the difference between width and flex-basis, in overall I understand is better to have flex-basis than width.
    I don't know if this is relevant but I would like to know from you!
    I like your videos! awesome content, keep going!!!

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

    This is an awesome video!!! Really helpful for me as i'M someone who's been working with backend for years and now has to do some CSS on a project, thank you!

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

    Nice work, I was only using flex for alignment and inline-block for the columns.

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

    Kevin , couldn't you have released this earlier. Kevin the best guy for css tuts.

  • @adee-xt7vh
    @adee-xt7vh 2 года назад +3

    Kevin, you are the KING OF CSS! Those, who want to know what they do (and not just copy-paste commands) and why, really appreciate the efforts (if it's an effort, but I think it's a pleasure for you) you make week by week. Keep up doing these amazing videos, we do really need them! Thanks a lot!

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

    Very glad I found your channel. You have a great way of explaining how things work. I already had a solid understanding but it was great hearing your perspective and understanding of the property.

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

    Kevin, my watch later list is basically your whole channel

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

    Thank you Kevin, this was so helpful! Would love to see more short videos like this explaining the function behind some basic CSS.
    I unfortunately never took a real course or learned CSS from the ground up but learned it aside to web development as a whole, that's why a quick basics video like this has a huge impact on me! Love your content, I'll keep watching :)

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

    been using flexbox for a while now and I kinda just wing it and try random things until i find a solution haha
    this video was so helpful!

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

    You have removed my confusions great !!!!

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

    Thank you! I really enjoy your contents.

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

    been using flexbox every day for the past year. and still clicked :p. idk what i expected. but great video never the less!!! love all your vids :)

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

    How simple way to explain, thanks kevin.

  • @JohnSmith-rn3vl
    @JohnSmith-rn3vl 3 года назад +1

    I've been doing web dev for 20 years and I feel like an idiot almost every time I watch one of your videos. I love it. Thank you.

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

      I agree - I've got 24 years in web design & development, and still learn something new every day.

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

    I think I love you.... I just jump to Lear this world of coding about a month ago and how you explain things is the best.

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

    We need more simple tricks like this

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

    Hi Kevin. Definitely one of the best front-end dev teachers I’ve seen!

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

    Very very nice presentation. Thank you

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

    I Learn a lot from this channel Thank you

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

    I thought I knew everything about flexbox. Than I created a container and i have given an specific width and inside this I made three other div with specific width. Than I used flex. And boom! Everthing inside the parent box is in mass.😂😂. Thanks Kevin. You are like just Gurdian Angel.

  • @danypelu11
    @danypelu11 3 года назад +6

    First comment! Thank you so much Kevin. From Argentina 🇦🇷!

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

    damn you’re so good at this

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

    Is there like a teachers Oscar we could nominate you for? Cause you deserve it!

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

    You're just a genie of css...just amazing!!!

  • @peoplearecool8766
    @peoplearecool8766 3 года назад +20

    What about flex:1; or flase-basis:100%; instead of width:100%; ?

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

      sure, was thinking this in the entire video, just put flex: 1

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

      Myself included

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

      .col {
      flex: 0 0 100%;
      }

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

    Your tutorials are gold

  • @caongoctunglam
    @caongoctunglam 3 года назад +2

    You must be patron saint of CSS :D Thank you so much for every videos you ever made :D

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

    Thank you so much for simple explanation!

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

    Great explanation, by the way, the quality of the video is so awesome

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

    Flexbox is everything. Flexbox is life.

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

    A mind of its own - perfect call! I am especially puzzled by the min-width: 0 trick that I usually need to use, esp when trying to get text-overflow: ellipsis in a fluid cell.

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

    Fantastic explanation!

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

    Great Content.

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

    That is so helpful. Thanks!

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

    I was so happy when Flexbox finally got a gap property, save me having to deal with margins. But sadly its not supported on Safari yet which I didn't know till some client started complaining things are smashed together on his screen.

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

    It does this 💪

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

    golden explanation is what I'd call this on the title 👌🏽👌🏽🌟

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

    Good lesson and I like the pace. Subbed

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

    Thank you so much kevin, simple but really meaningfull

  • @ahmedhussain-ph2fh
    @ahmedhussain-ph2fh 3 года назад

    this is eye opening , great vedio

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

    Amazing content!

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

    that was a great and clear explanation, thanks

  • @ciscou
    @ciscou 3 года назад +6

    Any difference between `with: 100%` and `flex-basis: 1`?

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

    I love your videos thank you so much sir

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

    Great explanation, I finally get it

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

    Thank you

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

    Thanks for sharing this smart trick. However, the solution using "width" does not work well if you want your flex container to wrap items, i.e. "flex-wrap: wrap;" - In this case, stretching items to the container width can still be accomplished by setting "flex: 1 1 0;" and a "min-width" instead of "width" for each flex item. Each item will start its layout with a zero width, expands to its required minimum width and can even grow further, if needed, to fit the whole container width. But... we would rather use CSS grid for such things. ;-)

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

    Thanks for sharing such a useful content .

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

    Very useful video, thank you 👍

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

    I'd go for `grid: repeat(auto-fit, minmax(100px,1fr))` in this case and save myself the media query requirement ;)

  • @0the0ambient0
    @0the0ambient0 3 года назад

    Great explanation. Thank you.

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

    you are the god of css

  • @RD-jr8nv
    @RD-jr8nv 3 года назад

    The lesson being, keep it 💯

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

    Soo informative. Thank you for creating this.

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

    Good stuff.

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

    Here goes my favorite css mentor

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

    You are just an amazing teacher! :D

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

    and thus i finally understand what flex is and does....finally!!!! thank you!!!!

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

    Thank you so much for doing this vids 🙏🏻

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

    In case you're wondering why not just flex: 1;, or flex-basis: 100%; Kevin's answer deep in comments below is:
    "Yup, because it gives them a flex-basis: of 0 then, but allows them to grow, so in the end it's the same effect, they all get the same width/flex-basis... in my case they are shrinking, in yours they grow. The beauty of CSS, lot's of ways to skin a cat :)"

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

    Love your content Kevin!!

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

    well, I usually use "flex: 1;"
    It is farily usefull. And no need to think about width. Just, everything is equall. It has some complicated problems, like if I need one part to be bigger, but in most of the cases, this is no problem.

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

    great video! im making a riding school administration web app for a school assignment and this really helped :]

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

    i have been using flex:1 on the direct child elements.