Box Model Playground

Grandma Marni’s packing table: set up a real crate on a real table top, and the browser measures the content, the straw (padding), the planks (border) and its…

Why it matters

"Why is my element wider than I set?" The answer is almost always the box model. Knowing the four layers and box-sizing ends the guessing about why a layout is a few pixels off. Many CSS resets (Tailwind included) put box-sizing: border-box on every element, so you need to know both.

The key idea

box-sizing decides what width counts

Common mistakes

Try it in this playground