Collapsing margins are incredibly frustrating when you don't understand them, but once you know how they work, and in what situations, you can find solutions to work around them.
Codepen from this video: https://codepen.io/kevinpowell/pen/NW...
CSS Working Group Mistakes made in CSS: https://wiki.csswg.org/ideas/mistakes
More information on Formatting Context: https://developer.mozilla.org/enUS/d...
Andy Bell / Piccalilli: https://piccalil.li/
Also follow Andy on Twitter: / piccalilli_
⌚ Timestamps ⌚
00:00 Introduction
00:51 What are collapsing margins?
03:02 Differences when using flexbox and grid
06:08 The wrong solution I see all the time
07:15 Using flowroot
08:36 A more ideal solution with a lot of control
#css
Come hang out with other dev's in my Discord Community
/ discord
Keep up to date with everything I'm up to
✉ https://www.kevinpowell.co/newsletter
Help support my channel
Get a course: https://www.kevinpowell.co/courses
Buy a shirt: https://teespring.com/stores/makingt...
Support me on Patreon: / kevinpowell
My editor: VS Code https://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 YouTube channel, make sure to follow me on Instagram and Twitter.
Instagram: / kevinpowell.co
Twitter: / kevinjpowell
Codepen: https://codepen.io/kevinpowell/
Github: https://github.com/kevinpowell
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!