Forum How do I...?

Collapse margin when on top of the page

SenH
How can I collapse the top-margin for a header (h2) element on the second and following pages? Prince seems to collapse the top-margin for the h element only on the first page.

I'm using latest Prince 7 beta.
SenH
This seems contrary to the change documented in the following thread.
http://princexml.com/bb/viewtopic.php?t=972
mikeday
That's strange, the top margin should be collapsed away if a heading happens to follow a natural page break, and only preserved if the heading is at the top of the first page, or follows a user-induced page break.
SenH
I made a test case.
http://temp.senhaerens.be/prince.colMargin.zip

The h2 margin is now preserved on the first page but not collapsed on subsequent pages.
mikeday
In this test case every element has a border, which will inhibit any margin collapsing between elements and the page margins.
SenH
That clears everything up! Putting the border on the page and header element is giving correct results.