Entries Tagged 'CSS' ↓

Clearing CSS Floats the Smart Way

The Problem
I’ve torn my hair out so many times trying to get CSS floats to clear properly. The problem is that when you have a floated element and a non-floated element in a containing box and the floated element is taller than the non-floated element, the floated element overflows the box, like so: more on smart floats