[solved] CSS auto clear floats
Posted: Tue Sep 20, 2011 5:19 pm
Hi everyone,
I've got a page with a random number of floated divs, the dimensions of which are very similar but not exact (therein lies the problem). I've got a fluid design, so each row of divs holds as many as it can, then the next div pops down onto the next "row" and continues. The problem is if I've got one div that's taller than the rest, the next row gets caught up on it like: What I want is for the next row to clear all the floats like so: This could easily be done with a static width layout, but since I'm going fluid, I can't just put in a clearing break.
Any ideas?
I've got a page with a random number of floated divs, the dimensions of which are very similar but not exact (therein lies the problem). I've got a fluid design, so each row of divs holds as many as it can, then the next div pops down onto the next "row" and continues. The problem is if I've got one div that's taller than the rest, the next row gets caught up on it like: What I want is for the next row to clear all the floats like so: This could easily be done with a static width layout, but since I'm going fluid, I can't just put in a clearing break.
Any ideas?