tubeshowcase●1,070,231 videosβ™‘ My collection 0
← Learn to Code

Learn to Code11:33

It might be time to rethink box-sizing: border-box

Kevin Powell β†—

From the creator

πŸŽ“ Start writing CSS with Confidence: http://cssdemystified.com/ πŸ”— Links βœ… Miriam’s article: https://www.oddbird.net/2025/09/04/box-model/ βœ‰ Keep up to date with everything I'm up to https://www.kevinpowell.co/newsletter πŸ’¬ Come hang out with other devs in my Discord Community https://discord.gg/nTYCvrK ⭐ Are you a beginner? HTML & CSS for absolute beginners is for you: https://learn.kevinpowell.co πŸŽ“ Start writing CSS with confidence with CSS Demystified: [https://cssdemystified.com](https://cssdemystified.com/) πŸš€ Already mastered CSS? Check out my advanced course, Beyond CSS: https://www.beyondcss.dev/ ⌚ Timestamps 00:00 - Introduction 00:21 - The problem with border-box on container/wrapper 02:26 - Using box-sizing: context-box to fix it 03:48 - We don’t declare sizes that often anymore 05:00 - Heights with context-box are often better too 07:20 - The times when border-box does make more sense 08:55 - Except maybe we don’t need it after all 10:20 - You probably don’t want to remove it for old projects 10:43 - CSS Demystified #css --- Help support my channel πŸ‘¨β€πŸŽ“ Get a course: https://www.kevinpowell.co/courses πŸ‘• Buy a shirt: https://cottonbureau.com/people/kevin-powell πŸ’– Support me on Patreon: https://www.patreon.com/kevinpowell or through YT memberships: https://youtube.com/@KevinPowell/join --- πŸ§‘β€πŸ’» My editor: VS Code - https://code.visualstudio.com/ 🌈 My theme: One Dark Pro Var Night πŸ”€ My font: Cascadia Code --- I'm on some other places on the internet too! If

Published 2025-09-24 Β· Watch on YouTube β†—
Availability and playback restrictions are controlled by the original channel.

Keep exploring Learn to Code