You can do that with margins?

  Рет қаралды 188,233

Kevin Powell

Kevin Powell

Күн бұрын

Пікірлер: 303
@ev721
@ev721 4 жыл бұрын
Thought I knew CSS. Then I discovered this channel. Now I never know how to feel after watching these videos. Happy to have learned something, close to tears when I realize how little I know.
@Dubstepschule
@Dubstepschule 3 жыл бұрын
Haha, same here!
@danielesibra2169
@danielesibra2169 3 жыл бұрын
The same too 😂
@rickyrayrosenberg420
@rickyrayrosenberg420 2 жыл бұрын
It's like some guy is a better boyfriend to my girlfriend than I am. Kevin is the mac.
@maggpie286
@maggpie286 2 жыл бұрын
How absolutely fabulous 🤩
@louisik1
@louisik1 8 ай бұрын
This is still one of the greatest bang for buck methods for arranging elements, especially for older pages/designs that don't have full fledged flex/grid/container implementations. Thanks again Kevin
@oskrm
@oskrm 4 жыл бұрын
"My flex grow is making it grow" - 2020 Kevin Powell
@tcritt
@tcritt 4 жыл бұрын
weird flex, but ok.
@victorwestmann
@victorwestmann 3 жыл бұрын
You should definitely release more courses on how to use CSS in general. You are a really good teacher.
@soulhazetv
@soulhazetv Жыл бұрын
Honestly his approach to teaching is by far the best I have come across here on YT. This is game changer..
@safintheship
@safintheship 4 жыл бұрын
when Kevin Powell uploads a CSS video you f***ing click it.
@djeudy
@djeudy 4 жыл бұрын
Facts!!
@muhammadamir4964
@muhammadamir4964 3 жыл бұрын
Indeed
@benzflynn
@benzflynn 3 жыл бұрын
204k subscribers can't all be wrong. I hope you boys are making KP _feel the love_ on Patreon . . .
@keshav6097
@keshav6097 3 жыл бұрын
@@djeudy re the point every see esa Re Re ek ek baat
@j.almadhaji
@j.almadhaji 4 жыл бұрын
Best Teacher on KZbin 🙏🏻
@fraidoonhu9284
@fraidoonhu9284 4 жыл бұрын
So simple, yet profound, a master piece of CSS code. Poetry written in CSS.
@hirumamwf3633
@hirumamwf3633 3 жыл бұрын
The value of knowledge in your whole videos is very expensive. And you gave us for free. Thank you very much.
@aram5642
@aram5642 4 жыл бұрын
When I started with css 100 years ago, I always wondered why you can center horizontally using margin auto, but not vertically. I love this vertical margin auto that has been made useful at last. This trick is so nifty when you want to align top/bottom some common elements within cards (such as link "Read more")
@Mark.Ritchie
@Mark.Ritchie 3 жыл бұрын
Every time I hear someone say 'em' when they talk, I now always feel they're trying to make a space in the sentence. That and recognising fonts in everyday life are things I'll probably never forget. Thanks css!!
@PHEELL822
@PHEELL822 4 жыл бұрын
What are the freaking odds that I come across this video on my feed while running into this exact problem with centering specific flex items while also pushing a few to the right? Kev you're the best!
@melzz
@melzz 3 жыл бұрын
Woah, my jaw literally open wide while watching this, i never knew those flex trick would make vertical margin auto work. Nice video
@dimensionalpotential
@dimensionalpotential 3 жыл бұрын
I appreciate that you add the errata , and also that you did it well (timing, and placement)!
@konsciousness
@konsciousness 4 жыл бұрын
I kinda knew how auto in CSS workes, but now I'm confident. Thanks again, Sir. If you think you have seen enough of CSS. You gotta binge watch Kevin's whole channel.
@RodrigoDAgostino
@RodrigoDAgostino 4 жыл бұрын
I learnt a while ago how to use margin: auto with flex-box to move one or several items to the opposite side, but I didn't know you could also use it to center one or some of them too. Thank you very much, Kev! :)
@GaryBarclay
@GaryBarclay 4 жыл бұрын
Awesome, you always reveal something over stuff I think I know already. Keep up the great content.
@CarlosChavez-gs1ld
@CarlosChavez-gs1ld Жыл бұрын
Hi Kevin, I have watched many of your videos and they are always well done. I write websites in the raw code (not templates) and have done a good handful of sites. This particular video directly addresses serious headaches I run into with respect actually achieving the spacing I am looking for in my navigations or other list-options areas. I won't bore you with the details of what I have done to make it work (it is WAY too embarrassing). It is the combination of the margin usage you discuss WITH THE "nth-of-type()" selecting you are doing that enables a big reduction in BOTH the amount of CSS and the amount of HTML/Structure required. Thanks again.
@shahzaibkhan5423
@shahzaibkhan5423 4 ай бұрын
Sir you just rocked. You just cleared our deepest doubt about the flex box. Thank you very much sir 🎉
@avananana
@avananana 3 жыл бұрын
To be fair, this all makes perfect sense when you give it some thought, but I would have never thought about this before seeing this video. I swear to god the knowledge this channel provides regarding CSS is pretty much unrivaled as far as I know, it's great.
@rosemaryvalad-on4888
@rosemaryvalad-on4888 3 жыл бұрын
How to be you sir?
@saalimkhan4133
@saalimkhan4133 4 жыл бұрын
The guy teaches CSS fundamental concepts with practical use cases that makes me to watch only CSS videos on entire the KZbin. Even though I hate CSS yet I love to watch his videos. Thanks man!
@mrinmoyghosh1749
@mrinmoyghosh1749 3 жыл бұрын
Best CSS designer you're..... You're always helping me a lot.
@jkevinparker
@jkevinparker 2 жыл бұрын
Kevin, I’m so glad I found your channel! My CSS knowledge was pretty extensive… in 2010. I’ve been out of the game for a while, so I’m learning to unlearn the hacks I’d learned to overcome Internet Exploder and other limitations. CSS seems to finally be mature, though I’m happy with how much of my old learning still applies!
@monsieurm2904
@monsieurm2904 4 жыл бұрын
Magicien of CSS !
@thrasosthrasos7353
@thrasosthrasos7353 3 жыл бұрын
In such cases it is more flexible to use a few dummy elements (does not render anything) and to insert them on those places where space should be taken (for example class="takeSpace") with style "flex-grow: 1;". This approach will work as expected when new link is inserted in the middle. Also it is possible to redistribute space in more flexible way by using different flex-grow values.
@cintron3d
@cintron3d 4 жыл бұрын
Using display flex to give margin auto super powers I love it. Did not know about that unique behavior.
@piromaniaco3579
@piromaniaco3579 4 жыл бұрын
You did it again!! Your channel is the top of top. Thanks Kev!
@Dimitar-T-Radev
@Dimitar-T-Radev 3 жыл бұрын
I love how happy he gets when saying "That's awesome". It's like watching Simon from Cracking the Cryptic finding his solution.
@heitorlessa2715
@heitorlessa2715 3 жыл бұрын
This became my favourite channel to learn CSS - Practical, great didactic, and to the point
@ThePhidge
@ThePhidge 3 жыл бұрын
Hey Kevin!! Sorry I'm so late to the party, but just wanted to let you know how much your videos are helping me out. I'm very new to the whole html/css/js thing, so tend to learn something new from any video I watch, but I find your way of explaining things and the level of detail you include seems to increase my understanding so much more. Thank you!
@conalbirtles3720
@conalbirtles3720 4 жыл бұрын
Great work! From a practical application point of view, the only suggestion I would make would be to add margin-left: auto to li:nth-last-child(2) instead of li:nth-of-type(6) because it's much more likely that a client will want to add another item to the middle 'site menu' than to the right hand 'login menu'. The way it's set up now, if you were to add, let say 'Shop' to that middle menu, the layout would break. (You'd also need to change nth-of-type(7) to nth-last-child(1) but that probably goes without saying)
@olivernygren2967
@olivernygren2967 4 жыл бұрын
Your channel is so helpful and you make everything so easy to understand. Much appreciated and please keep the content coming!! Sincerely, Front end developer student in his first week :)
@amrani_art
@amrani_art 4 жыл бұрын
Didn't know flex-grow also works vertically. I was using height:100vh instead. Thanks for the tip!
@PolishPolackski
@PolishPolackski Жыл бұрын
Kind of first day at work and I did shine like a hero. A day, or two ago I watched THIS very video. Flex -> margin-top:auto did magic in Woo's tile.
@vasylbats2544
@vasylbats2544 4 жыл бұрын
Yes, I use such margins all the time in the flex boxes in my practice. Thanks, Kevin!
@malamhari_
@malamhari_ 3 жыл бұрын
I see why sometimes my margin didn't work properly, display:flex is the cause! Thanks
@emkisn
@emkisn 4 жыл бұрын
I didn't learn anything from this video, but WHAT A GREAT VIDEO! I need to say that you are killing it at the content quality. I follow you channel for at least 2 years from now, and i need to give some feedback. The quality of the videos, the editing, the timing, its much more robust, you are really doing an amazing job, congratulations a lot. This tips and simple exemples help a lot, keep doing. Sometimes the subject of the video is not a new topic for me, but i always try to watch, just for the channel support, best regards. (sorry my noobie english)
@ОлегПузанкін
@ОлегПузанкін 3 жыл бұрын
Thank you man, good tricks for beginners to simplify markup just using margin property
@afsanazamannipa7711
@afsanazamannipa7711 4 жыл бұрын
WOW, that's really cool. There are more things to use margin auto in CSS. Thanks a lot for the video.
@haldanegreen423
@haldanegreen423 2 жыл бұрын
Def learnt more than a couple things, thanks as always Kevin, the way you explain the markup is awesome
@daver3270
@daver3270 3 жыл бұрын
You're a great instructor Kevin. Thank you
@YokoYoko_
@YokoYoko_ 2 жыл бұрын
I am currently learning the basics of CSS and this video gave me more motivation to go forth. So many crazy stuff that can be done with CSS!
@kimokimo-se3ur
@kimokimo-se3ur 4 жыл бұрын
thank you , great teacher !! love from Tunisia .
@lowercaseguy3578
@lowercaseguy3578 4 жыл бұрын
you're awesome! i always stuck with floats , now its very easy.
@noclistify
@noclistify 4 жыл бұрын
I love this one, thanks for the content Kevin.
@arminmatthes
@arminmatthes 2 жыл бұрын
Wow, thanks for reminding me that you could actually center with margin:auto. I pretty much only use flexbox these days for centering. The good old times :D
@cretik_shmurda
@cretik_shmurda 2 жыл бұрын
I used to do divs and was overwhelming. Thanks powell
@MrEvansjethro
@MrEvansjethro 3 жыл бұрын
That's powerful, Powell. Perhaps I should say a Powellful CSS margin usage indeed.
@caffeinated-pixels
@caffeinated-pixels 3 жыл бұрын
Ah, super useful, particularly for the vertical positioning!
@yashkanekar6977
@yashkanekar6977 3 жыл бұрын
hello Kevin , I honestly just want to thank you enough ;u are doing such a wonderful job. I have been through your responsive layout course, it has made me better. I hope you never stop!!!! Thank you so very much!
@HaraldEngels
@HaraldEngels 4 жыл бұрын
Brilliant! Thank you. After doing CSS since 20 years I learned something new today :-)
@abhishek.rathore
@abhishek.rathore 4 жыл бұрын
Your the only one who actually understands and can explain CSS. I just keep typing trash until it looks like I want it to.
@RaiderBV
@RaiderBV 4 жыл бұрын
Something to keep in mind though, that this example depends on a static page. If you'd add any navigation elements it would mess up all indices. Still very interesting and useful tool.
@TheMrblaster2012
@TheMrblaster2012 2 жыл бұрын
hi, what do you mean by navigation elements?
@riktigaoakis
@riktigaoakis 2 жыл бұрын
I have always used backgrounds when doing layout. It just makes it a lot easier to see what is happening. ✌️
@alibarznji2000
@alibarznji2000 3 жыл бұрын
Never have I ever had a hard time learning something other than CSS.
@hafpixels4172
@hafpixels4172 4 жыл бұрын
I'm really thankful for this. What I needed
@brootaylor
@brootaylor 4 жыл бұрын
Brilliant stuff Kevin. You've got a gift for explaining things simply and succinctly. Keep up the fab work and much appreciated.
@TerranceShaw
@TerranceShaw 4 жыл бұрын
Continue to love your stuff, Kevin! This definitely helped far more eloquently solve a problem I've had to hack together in the past. Keep up the awesome!
@degagnemarc
@degagnemarc 3 жыл бұрын
Merveilleux! Just the solution I for a problem I had! Thanks
@muhammadamir4964
@muhammadamir4964 3 жыл бұрын
Thanks Kevin for sharing your knowledge. It is very painful to learn on your own such effects but you make these things very simple and easy. Thanks
@arunh3
@arunh3 3 жыл бұрын
I don't think I have subscribed to channel after watching just 2 videos, but this content is just really good and very well explained, so I subscribed. I am more of a backend person and gets tripped up with css sometimes so these videos are great for me.
@Will-cn7vg
@Will-cn7vg 4 жыл бұрын
Thanks Kevin! Extremely helpful as always
@onestepwebdev
@onestepwebdev 4 жыл бұрын
Thanks Kevin, that's very awesome of you to do this quick Tut. Using Flex-box on a sidebar is a stroke of genius, what else should I have expected. How about drop-down menus inside the menu. Obviously, sub-lists would be one way.
@codesader
@codesader 4 жыл бұрын
Awesome content as always. Got better clarity.
@Mwtorres89
@Mwtorres89 2 жыл бұрын
you need to 100 percent release a UDEMY course for begginers from start to finish from basic HTML / CSS and maybe some Javascript. I would 100 percent purchase it.
@ibelong2u
@ibelong2u 4 жыл бұрын
This is brilliant! I'm fantasizing about all the fun I can have with this and media queries. Thank you for sharing.
@GlaucoGodoi
@GlaucoGodoi 4 жыл бұрын
Super useful !Thank you Kevin !
@fabianpetersen2452
@fabianpetersen2452 Жыл бұрын
Hi Kevin, really loved this video. I always get stuck wih CSS and this helped me alot to understand how this all works. 👍
@ramyfares81
@ramyfares81 4 жыл бұрын
It's been long since I've learned something new so cool in CSS. It's amusing to always know that there's something new to learn.
@kalokanev
@kalokanev 2 жыл бұрын
I have recently found your tutorial. You are doing a great job! Keep up the good work, Kevin!
@nicbongo
@nicbongo 4 жыл бұрын
This is amazing for accessibility. The amount of time I've spent wrapping content in parent elements to ensure flex or grid is inherited... You can remove so much unnecessary divs and other container tags. Great content, I'll be using this first thing tomorrow for my project, thanks!
@AyDeeSandra
@AyDeeSandra 4 жыл бұрын
Same thing I said to myself. Lighter DOM, faster render tree
@jameslesperance1
@jameslesperance1 3 жыл бұрын
You have really helped me. Thank you!
@rohitpurkait6951
@rohitpurkait6951 3 жыл бұрын
You are really " The King of CSS "
@benzflynn
@benzflynn 3 жыл бұрын
Great vid. Very handy feature. Thanks, KP.
@joyvideos1802
@joyvideos1802 4 жыл бұрын
Cool options with margin, Thanks Kevin❤
@n36u1a
@n36u1a 3 жыл бұрын
thank you Kevin for making my corner of the internet a little bit more awesome ;)
@k3tna
@k3tna 4 жыл бұрын
Incredible. Thanks Kevin.
@dennyyap8184
@dennyyap8184 2 жыл бұрын
Appreciated for sharing Kevin👍🙏 it is really useful.
@djlee0721
@djlee0721 4 жыл бұрын
Kev you easily deserve 1 million + subscribers. Thanks again for this great video!
@RangelNetto
@RangelNetto 4 жыл бұрын
Oh fucking God, a new css trick(I have no idea if it's really new, but, I didn't know until this video). Every day I need to learning something new... But I still loving css SZ. Thank you for sharing.
@th-shubham
@th-shubham 2 жыл бұрын
12:43 pretty awesome
@Akimb321
@Akimb321 3 жыл бұрын
Thank you for these videos, they're really great
@aebek1413
@aebek1413 2 жыл бұрын
your videos are well structured and good , keep up the great work you are great teacher.
@HARIKRISHNANSRSRSHD
@HARIKRISHNANSRSRSHD 4 жыл бұрын
Kevin, your tutorials are awesome..!
@AJ-1404
@AJ-1404 Жыл бұрын
Thank you Kevin
@infosandfacts7536
@infosandfacts7536 4 жыл бұрын
Great stuff as positioning options are always very welcome.
@bintangnaufal
@bintangnaufal Жыл бұрын
No need to div the nav again! awesome!
@mounir101
@mounir101 4 жыл бұрын
Pretty awesome! Thank you.
@oliver139
@oliver139 3 жыл бұрын
Your tutorials are really awesome
@semiloreidowu4601
@semiloreidowu4601 3 жыл бұрын
To say I'm wowed seems like the understatement of the century😮
@Uthael_Kileanea
@Uthael_Kileanea 2 жыл бұрын
When I rewatch this video, I might finally know how to center a div.
@pablobarrientos2071
@pablobarrientos2071 2 жыл бұрын
Another day, another thing to learn about CSS from the master!
@TheCocoaDaddy
@TheCocoaDaddy 4 жыл бұрын
Awesome video! Very useful!!! Thanks for posting!
@m.biplav
@m.biplav 4 жыл бұрын
Been learning so much from you, you're amazing!
@AkkaldeviVivek
@AkkaldeviVivek 4 жыл бұрын
bro, you're awesome
@abdelmonemnaceur7776
@abdelmonemnaceur7776 4 жыл бұрын
You deserve much more subscribers and thumbs up, Keep it up!
@ari_archer
@ari_archer 3 жыл бұрын
what's the differance between and ?
@alexftw356
@alexftw356 2 жыл бұрын
well i needed that. thank you
@clintongallagher
@clintongallagher Жыл бұрын
I use background-color: on just about anything --*but*-- unlike Kevin I do not delete the entire statement when I think I don't need it any more. I change the value to transparent so I can use it again.
@ChrisAthanas
@ChrisAthanas 3 жыл бұрын
Very good explanation of a difficult subject
@yashwanthsrini
@yashwanthsrini 11 ай бұрын
Awesome stuff. Thanks a lot! ❤
Collapsing margins - what they are and how to deal with them
14:31
Kevin Powell
Рет қаралды 65 М.
5 CSS mistakes that I see way too often
19:03
Kevin Powell
Рет қаралды 360 М.
ТЫ В ДЕТСТВЕ КОГДА ВЫПАЛ ЗУБ😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,4 МЛН
How To Choose Mac N Cheese Date Night.. 🧀
00:58
Jojo Sim
Рет қаралды 87 МЛН
How to take control of Flexbox
16:01
Kevin Powell
Рет қаралды 142 М.
CSS Popover + Anchor Positioning is Magical
20:44
Kevin Powell
Рет қаралды 27 М.
5 simple tips to making responsive layouts the easy way
15:54
Kevin Powell
Рет қаралды 777 М.
My top 5 most popular front-end tips
22:07
Kevin Powell
Рет қаралды 61 М.
Flexbox or grid - How to decide?
18:51
Kevin Powell
Рет қаралды 742 М.
How you can simplify your CSS with :is()
9:20
Kevin Powell
Рет қаралды 336 М.
The secret to mastering CSS layouts
17:11
Kevin Powell
Рет қаралды 291 М.
A new approach to container and wrapper classes
25:27
Kevin Powell
Рет қаралды 268 М.
Learn flexbox the easy way
34:04
Kevin Powell
Рет қаралды 724 М.
Learn CSS Positioning Quickly With A Real World Example
8:32
Slaying The Dragon
Рет қаралды 692 М.