No video

Finally understanding Flexbox flex-grow, flex-shrink and flex-basis! - Tutorial 11 of 20 💪

  Рет қаралды 84,910

Wes Bos

Wes Bos

Күн бұрын

Пікірлер: 83
@i-heart-google7132
@i-heart-google7132 4 жыл бұрын
Bro, you're better than the official documentation and all those lame tutorials combined! Great work!
@jarrychen2096
@jarrychen2096 2 жыл бұрын
I spent a lot of time reading the documentation, but eventually understood it in your ten minutes video! So incredible.
@Powerful-Manifestor-
@Powerful-Manifestor- 2 жыл бұрын
Watching all other videos, I wondered why the width of one is not in proportion to the other. You made it so clear that the extra room is divided in that proportion. Awesome! Two questions: 1. What is flex-basis when flex:1 is used? 2. What is the difference between using width vs flex-basis on a flex item?
@arifulislamadil4295
@arifulislamadil4295 3 жыл бұрын
i have watched lots of youtube videos about flex-grow and shrink., i really didn't understand them properly after i watched this it's gave the clear concept about flex-grow and flex-shrink.Thank you very much Wes Bos
@nellypolly6639
@nellypolly6639 Жыл бұрын
this video gave me more understanding of flex shorthand. Thank you
@pilloIMNG
@pilloIMNG Жыл бұрын
Great explanation! I now understand more about these properties, thank you! I gotta note that the intro is very loud and your voice is very low, but this video is 7 y o so might have changed.
@debi199
@debi199 2 жыл бұрын
thanks for all the efort and love
@ajcics
@ajcics 7 жыл бұрын
You're an incredible teacher. Thank you
@rafayzia4180
@rafayzia4180 2 жыл бұрын
love your gentle voice bro ! thank you :)
@dudakoff1000
@dudakoff1000 Жыл бұрын
You are a gem. The CSS tricks article dedicated to this topic failed me this time
@prajwalpandeshwar9967
@prajwalpandeshwar9967 9 ай бұрын
Thankyou so much for such an easy explanation!!
@codeme8016
@codeme8016 Жыл бұрын
Good tutorial. You can also enable the browser's responsive "toggle device toolbar" tool e.g. Chrome to resize the frame instead of resizing your entire browser window.
@WILLGYS
@WILLGYS 3 жыл бұрын
Man is for box, not the container! that's why it wasn't doing anything. Thanks Wes
@shivarammuthukumaraswamy7164
@shivarammuthukumaraswamy7164 3 жыл бұрын
Thank You so much for the clear explanation
@HarpreetSingh-vf6lu
@HarpreetSingh-vf6lu 7 жыл бұрын
Can you explain the math of why we use 1? What calculations are done for use to know which number to use and what it does for flex grow? Thank you.
@suyashpurwar8310
@suyashpurwar8310 3 жыл бұрын
This video was really helpful! Helped a lot! I was very confused when it comes to these three properties. Thanks a lot!!
@boiiiiiiiiiiiiiiii2612
@boiiiiiiiiiiiiiiii2612 Жыл бұрын
thank you for the explanation.
@Bruce-Baum
@Bruce-Baum 2 жыл бұрын
way better explanation than codecademy
@Dorff_Meister
@Dorff_Meister 2 ай бұрын
Very helpful. Thanks.
@friend1310
@friend1310 8 жыл бұрын
Hi Wes, can you please use fractions to express how much an element is giving away of its width when using flex-shrink? I think I don’t get it. You use flex-basis:400px for both .box1 and .box2. So, when the container is 800px wide, each box is 400px wide. Then you use flex-grow:10 for .box1 and flex-grow:1 for .box2. So, when the container gets wider than 800px the extra room will get split between the elements using the ratio we set for flex-grow. My understanding is that .box1 gets 10/11 of free space and .box2 gets 1/11. So yes, .box1 gets 10x more extra space than .box2. But how does this work with flex-shrink? We used the same values for flex-shrink as for flex-grow, but obviously .box1 is not giving away 10/11 of its width when the container gets below 800px. Thanks!
@friend1310
@friend1310 8 жыл бұрын
I think I got it, but I am not sure if I'm right. I think that if the container gets for example 700px wide the .box1 and 2 miss 100px, they just can't be 400px each any more. So, they have to split the 100px using the ratio above, meaning .box1 will be narrower by 100*10/11~90.91px and .box2 will be narrower by 100*1/11~9.09. The new width of .box1 will be 400-90.91=309.09px and the width of .box2 will be 400-9.09=390.91px. Now .box1 and .box2 (309.09+390.91=700) exactly fit 700px wide container. Can somebody confirm my theory? :D
@friend1310
@friend1310 8 жыл бұрын
Yes, that's how it works. I just checked it using web inspector.
@HarpreetSingh-vf6lu
@HarpreetSingh-vf6lu 7 жыл бұрын
Hey, can you explain the math behind this please of how flex-grow works, hard to find online.
@matthewbell5282
@matthewbell5282 4 жыл бұрын
Really, really well explained - thank you!
@montecristo7963
@montecristo7963 2 жыл бұрын
Thank you that was really helpful
@suridchakma4403
@suridchakma4403 3 жыл бұрын
Your style of describing is super 🔥
@ahmedam77
@ahmedam77 Жыл бұрын
great video!
@NanarStudios
@NanarStudios 2 жыл бұрын
Helpful, but you have to watch in 1.5x speed for it to almost feel like a normal speaking speed
@StrangeIndeed
@StrangeIndeed 3 жыл бұрын
I had to refresh my memory about flexbox, and this video was great for that, thank you c;
@abstractdavis
@abstractdavis 4 жыл бұрын
Thanks a lot, very clear explanation
@Free--Soul
@Free--Soul 3 жыл бұрын
great job
@MikeMike-ms1ns
@MikeMike-ms1ns 3 жыл бұрын
why is there bullshit like if you are in the 10th level div you can't set it to use the remaining space but need to put display flex on every level of div above it? Shouldn't immediate div be enough?
@Undrios
@Undrios Жыл бұрын
thank you!
@ronishlopchan2020
@ronishlopchan2020 2 жыл бұрын
great content!
@ycombinator765
@ycombinator765 2 жыл бұрын
Wes is the Boss
@neozhang8700
@neozhang8700 4 жыл бұрын
excellent explanation~~
@codesiddhi
@codesiddhi Жыл бұрын
👍well explained, thanks :)
@LongNguyen-op7ls
@LongNguyen-op7ls 4 жыл бұрын
Very good tutorial man ! These flex things was annoying me for hours
@steelo2214
@steelo2214 2 жыл бұрын
yah that’s it. subscribed!
@uimonk
@uimonk 3 жыл бұрын
you are awesome..
@austinethridge2771
@austinethridge2771 5 жыл бұрын
Thank you sir! I understand it now
@ek4m81
@ek4m81 5 жыл бұрын
that's good
@henriquemagno9326
@henriquemagno9326 Жыл бұрын
thanks
@Stone_624
@Stone_624 4 жыл бұрын
This is a beautiful explanation, Thank you!
@armandoperez9528
@armandoperez9528 7 жыл бұрын
Oh my god, this intro is soooo annoying. It is still a great tutorial.
@SuperKojota
@SuperKojota 6 жыл бұрын
Stupid whisper.
@leakyabstraction
@leakyabstraction 3 жыл бұрын
Pretty sure all the downvotes are the result of that intro. I was so annoyed... Started to wonder if there is something seriously wrong with me to find it that annoying; but then I saw your comment.
@spencerwasden5155
@spencerwasden5155 3 жыл бұрын
@@SuperKojota did you mean "whistle"? If so I agree--it actually hurt my ears. But great tutorial!! Thanks @Wes Bos
@ankurc
@ankurc 4 жыл бұрын
Thank you. You made it very clear!
@lddonovan
@lddonovan 8 жыл бұрын
Great tutorial!
@amr19932012
@amr19932012 2 жыл бұрын
Simple and informative, Thank you !
@jaredsimon3731
@jaredsimon3731 2 жыл бұрын
Thank you sir. This was great.
@chome4
@chome4 6 жыл бұрын
How do you apply 'wrapping' to force the second box onto the second row?
@blueapple9135
@blueapple9135 3 жыл бұрын
Thanks for well explained.
@barrbudo
@barrbudo 8 жыл бұрын
What's the extension you are using for informing the screen dimensions? The ones I've found so far do not work if I'm working with a local file :(
@toddjudd9552
@toddjudd9552 8 жыл бұрын
+Barbudo view port dimensions available in the chrome store here: chrome.google.com/webstore/detail/viewport-dimensions/kchdfagjljmhgapoonapmfngpadcjkhk/related?hl=en-US
@barrbudo
@barrbudo 8 жыл бұрын
Todd Judd Thanks :)
@ted2091
@ted2091 2 жыл бұрын
explained it perfectly, thank you
@williamjamesrapp7356
@williamjamesrapp7356 4 жыл бұрын
Looks good You do a fair job of teaching this BUT what happens when I type in What you type in and IT STILL DOES NOTHING ?
@shotbylowie
@shotbylowie 4 жыл бұрын
check if you linked your css correctly in your
@majdalkwaja9792
@majdalkwaja9792 5 жыл бұрын
Thanks bro
@haley8004
@haley8004 3 жыл бұрын
Someone know what this means? I have no idea. "kind of look at your layout and intelligently figure out how big these other ones should be"
@dijanad6021
@dijanad6021 4 жыл бұрын
good explanation!
@juniorusca602
@juniorusca602 3 жыл бұрын
I love this explication
@graceji4082
@graceji4082 7 жыл бұрын
awesome tutorial!
@jasserlabiadh7012
@jasserlabiadh7012 2 жыл бұрын
bro thaaank youuuuuuuuuuuuu ily
@cashpay50
@cashpay50 3 жыл бұрын
subscibed!
@Johann.Liebert
@Johann.Liebert 2 жыл бұрын
thanks :D
@dvidalv
@dvidalv 3 жыл бұрын
excelent!
@nasko717
@nasko717 7 жыл бұрын
Thanks!
@nailalzuhairi2690
@nailalzuhairi2690 5 жыл бұрын
u r brilliant
@EquinoXReZ
@EquinoXReZ 3 жыл бұрын
Fire
@napolunatico
@napolunatico 6 жыл бұрын
I think this is not completele well explained. Why? Because when you give flex-grow or flex-shrink to an element you do not make 'x' times bigger than the other one, you are just using 'THE AVAILABLE SPACE', and dividing it in many spaces as you have given to the summary of all the elements, and from this point the browser gives the size to every element according with the number of flex-grow o shrink that you gave to it every single element. (My english is not good enought sorry). Bless!
@tabniletley2643
@tabniletley2643 4 жыл бұрын
i actually really like the intro. it's so 90's!
@l3tk1ll
@l3tk1ll 7 жыл бұрын
ty
@BohemianOnTheRoad
@BohemianOnTheRoad 9 ай бұрын
omg its 8 year ago
@igu642
@igu642 Жыл бұрын
❤❤
@amirhossein7984
@amirhossein7984 3 жыл бұрын
Just play at 1.25x speed.
@afaque.
@afaque. 4 жыл бұрын
what if he started again making these intros in his new videos...that will be
@Rivederchee
@Rivederchee 2 жыл бұрын
this left earrape
@Oguztogrul
@Oguztogrul Жыл бұрын
You explain very bad. Sorry.
@fondungallahkondem2923
@fondungallahkondem2923 3 жыл бұрын
thank you so much
Flexbox design patterns you can use in your projects
15:33
Kevin Powell
Рет қаралды 441 М.
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 16 МЛН
The CUTEST flower girl on YouTube (2019-2024)
00:10
Hungry FAM
Рет қаралды 39 МЛН
15 Years Writing C++ - Advice for new programmers
4:04
SyncMain
Рет қаралды 1,2 МЛН
Learn flexbox the easy way
34:04
Kevin Powell
Рет қаралды 703 М.
Top 10 Linux Job Interview Questions
16:04
tutoriaLinux
Рет қаралды 2,3 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 400 М.
CSS Flex vs Grid (using Tailwind CSS) | Which to choose?
33:02
I've been using Redis wrong this whole time...
20:53
Dreams of Code
Рет қаралды 356 М.
All useEffect Mistakes Every Junior React Developer Makes
22:23
Unveiling my winning secret to defeating Maxim!😎| Free Fire Official
00:14
Garena Free Fire Global
Рет қаралды 16 МЛН