On 8/2/07, Thomas Dalton thomas.dalton@gmail.com wrote:
Okay, then
div.chapter > :last-child { clear: both; }
That almost works. It stops the floats one element before the end of the div, though, so you end up with a gap before the last paragraph in most cases.
Yes, I realized that after posting. I don't know of anything like "clear-after" in CSS (maybe in CSS3? or is there some way to do it I'm missing?). Basically, as I say, you'd have to use dummy elements anyway for now to account for IE et al.
It does have the advantage, AFAIK, of not creating an extra line break.
I think that depends on browser, I think some do put a line break around divs.
I find that hard to believe, honestly. CSS support may be flaky in many cases, but even IE long ago got pretty much all of CSS1 down (okay, the box model implementation was slightly wrong until IE7).