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: codepen.io/kevinpowell/pen/NW...
CSS Working Group Mistakes made in CSS: wiki.csswg.org/ideas/mistakes
More information on Formatting Context: developer.mozilla.org/en-US/d...
Andy Bell / Piccalilli: 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 flow-root
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
✉ www.kevinpowell.co/newsletter
---
Help support my channel
👨🎓 Get a course: www.kevinpowell.co/courses
👕 Buy a shirt: teespring.com/stores/making-t...
💖 Support me on Patreon: / kevinpowell
---
My editor: VS Code - 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 RU-vid channel, make sure to follow me on Instagram and Twitter.
Instagram: / kevinpowell.co
Twitter: / kevinjpowell
Codepen: codepen.io/kevinpowell/
Github: github.com/kevin-powell
---
And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!
31 май 2024