Strategies for Margins, Padding, Gaps, & More | Tutorial from Kevin Powell @MasterDotDev
Strategies for Margins, Padding, Gaps, & More | Tutorial from Kevin Powell  @MasterDotDev
Uploaded March 2026 | Updated November 2026, 3 hours ago
Spacing on the web seems simple, but suddenly margins inexplicably collapse (or stop collapsing), padding is inconsistent in strange ways, and your layouts look off balance for reasons you don’t understand. In this video, Kevin explores how to take control of spacing through margins, padding, and gaps, and also explores the new box-trim properties and values.

First Example CodePen: codepen.io/kevinpowell/pen/WNVaqeZ
Second Example CodePen: codepen.io/kevinpowell/pen/jENxeXV

Kevin Powell’s courses on Frontend Masters: frontendmasters.com/teachers/kevin-powell

Find Frontend Masters Online:
Twitter: twitter.com/FrontendMasters
LinkedIn: linkedin.com/company/frontend-masters
Facebook: facebook.com/FrontendMasters
Instagram: instagram.com/FrontendMasters
TikTok: tiktok.com/@frontendmasters

About Us:
Advance your skills with in-depth, modern front-end engineering courses — our 250+ high-quality courses and 24 curated learning paths will guide you from mid-level to senior developer! Start your path to mastery today: frontendmasters.com/?utm_source=youtube&utm_medium=home_link&utm_campaign=exlusive
Strategies for Margins, Padding, Gaps, & More | Tutorial from Kevin PowellClaude Code Has NO Memory (heres what it does instead)Can you pass a Netflix/Meta/Google frontend interview?Why SvelteKit Forms Work Without JavaScriptFor POST, PUT, PATCH, think “payload”Donut Scope (@scope in CSS) | Tutorial from Chris CoyierHow To Debug Like a Pro - From Beginner To Expert | Tutorial from WebDevSimplified5 Words That Boost AI Accuracy 🚀🤖🤖 How LLMs Understand Word MeaningReal Advice for Engineers Starting Their Careers (From People Whove Been There)Six workshops. One month. The headliner is FREE.C Programming: 50+ Years of Innovation and Relevance 🚀
MasterDotDev |

Strategies for Margins, Padding, Gaps, & More | Tutorial from Kevin Powell

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER