Latest articles tagged box-model

Teaser image

I ran across a quirk of CSS recently, related to the box model, that struck me as counter-intuitive behavior. To be honest, it's an issue I've repeatedly run into over the years that I've always bumbled my way around, and never fully understood.

Consider this simple example of a <div> element with a child <p> element that has top and bottom padding. Read more...