tubeshowcase●1,682,510 videos♡ My collection 0
← Learn to Code

Learn to Code14:31

Collapsing margins - what they are and how to deal with them

Kevin Powell ↗

From the creator

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/NWdOyrP CSS Working Group Mistakes made in CSS: https://wiki.csswg.org/ideas/mistakes More information on Formatting Context: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Flow_Layout/Intro_to_formatting_contexts Andy Bell / Piccalilli: https://piccalil.li/ Also follow Andy on Twitter: https://twitter.com/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 💬 https://discord.gg/nTYCvrK --- 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/making-the-internet-awesome 💖 Support me on Patreon: https://www.patreon.com/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:

Published 2021-04-22 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code