Forum How do I...?

... collapse the top-margin of a float that ends up at the top of the page

emece
Hi,

In a document I'm currently working there are many <figure>s with style "float:inside;" and "margin-top:16pt;". When any of such <figure>s are floated to the top of the page, they insist on not collapsing their top margin. All of them have neither padding, nor border nor background, and contain an <img> plus a <figcaption> after it (although changing the <img> by another tag behaves similarly).

Why does their margin-top not collapse?

Thanks & regards.

Edited by emece

mikeday
When you say floated to the top of the page, are they page floats or do they just happen to occur at the beginning of a new page? Float margins are generally preserved and do not collapse.
emece
It simply happens that they occur at the top of the page.

Incidentally, they also have a bottom margin, that does not collapse if it happens that the floats occur at the bottom of the page.

Regards.