DEV Community

David Chappell
David Chappell

Posted on

What blue eggs taught me about the CSS Box Model

Image descriptionSo there I was in my kitchen. I opened the fridge to find a tray full of blue painted hard boiled eggs.

"What does this all mean?" I said to myself? 🧐 Searching for an answer I cracked open a blue egg and then it hit me.

Image description

The egg yolk is the content, the egg white is the padding, the shell is the border, the blue paint is the margin

There it is, that's a simple analogy of the CSS box model.

Top comments (0)