Forum How do I...?

Clearing top-floating figures before new section?

alexmilowski
I have rule for figures and sections:

figure {
float: top unless-fit;
}

section {
clear: both;
}

but I think "both" only applies to left/right floats.

I have a figure that can't fit on the page and so it floats to the next. Unfortunately, it ends up in the next section. I want the top floats to clear before the next section starts.

I looked at some of the current working drafts and I see new values for the clear property of 'top', 'bottom', 'page', and 'column'. I tried 'top' but it didn't work. That's not a big surprise because the documentation doesn't list it as a value.

Is there a way to do this?
alexmilowski
mikeday
Hmm, not yet. But we are definitely going to add this.
arthurattwell
Is there any news on clearing top and bottom floats? I couldn't find it on the roadmap, and it would be great to have.
hubprince
I'd like to be able to specify that all floating figures must be kept within their containing section (e.g. the Results section of a manuscript) and not float into subsequent sections (e.g. a References section).