I've got several floated boxes with different heights. I'd like for everything to be pushed up together, but for some reason, it's putting the next floated box at the same level as the bottom of the longest box.
That should clear the floats, otherwise the last box will indeed jump down one line or so.. I don't really know why, but it helps.
Edit: Read through this, it might have some important info about the floats and clearing floats, probably better the way I explained it. Actually, after quickly looking at that article, I'm not sure my solution is correct :P
I've got several floated boxes with different heights. I'd like for everything to be pushed up together, but for some reason, it's putting the next floated box at the same level as the bottom of the longest box.
Unfortunately, that's not how floats work. The latest screenshot that you've provided is exactly what a user should expect with floated boxes that have "clears" properly applied to them. If you want lots of different boxes of different heights to all be together, you'll have to go beyond CSS.
The flow of the boxes are working like they should. Are these boxes automatically generated? If not, why not have 3 wrapper divs that contain 2 boxes (stacked on top of each other). then float the wrapper divs.
Here's a picture of that I'm talking about: http://twitpic.com/2rh0lp/full
Here's the CSS for those boxes:
Anyone have this happen before?
with CSS code:
That should clear the floats, otherwise the last box will indeed jump down one line or so.. I don't really know why, but it helps.
Edit: Read through this, it might have some important info about the floats and clearing floats, probably better the way I explained it. Actually, after quickly looking at that article, I'm not sure my solution is correct :P
http://twitpic.com/2riexa/full
Unfortunately, that's not how floats work. The latest screenshot that you've provided is exactly what a user should expect with floated boxes that have "clears" properly applied to them. If you want lots of different boxes of different heights to all be together, you'll have to go beyond CSS.
Hope my suggestion makes sense
Thanks.