It might be time to rethink box-sizing: border-box @KevinPowell
It might be time to rethink box-sizing: border-box  @KevinPowell
Uploaded September 2025 | Updated November 2026, 3 hours ago
πŸŽ“ Start writing CSS with Confidence: cssdemystified.com

πŸ”— Links
βœ… Miriam’s article: oddbird.net/2025/09/04/box-model

βœ‰ Keep up to date with everything I'm up to kevinpowell.co/newsletter
πŸ’¬ Come hang out with other devs in my Discord Community discord.gg/nTYCvrK
⭐ Are you a beginner? HTML & CSS for absolute beginners is for you: 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: kevinpowell.co/courses
πŸ‘• Buy a shirt: cottonbureau.com/people/kevin-powell
πŸ’– Support me on Patreon: patreon.com/kevinpowell or through YT memberships: youtube.com/@KevinPowell/join

---

πŸ§‘β€πŸ’» My editor: VS Code - 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 you'd like a behind the scenes and previews of what's coming up on my YouTube channel:

Bluesky: https://bsky.app/profile/kevinpowell.co
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!
It might be time to rethink box-sizing: border-boxHandy CSS layout patterns, and fun ways to elevate themCSS style queries in actionEven more ways to center a divBuild modals in minutes with the dialog elementDont sleep on this underrated CSS layout featureFront-end fast money with Adam ArgyleAuth & backend so simple even this CSS dev gets itThis custom property trick solves a common CSS problemCan I recreate this animated gradient button?CSS Attribute SelectorsThis CSS property fixes a problem as old as CSS - a look at text-box-trim and text-box-edge
Kevin Powell |

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

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER