Hi there,
I'm struggling to get Prince to collapse the margins on my bilingual documents and could use some assistance.
The content is a faux two column layout, structured like so:
Initially I was using a flex layout:
But have since learned in the docs that the margins are not collapsed in flex layouts, so have switched to using:
My issue is that Prince is still not collapsing the top-margin for elements on the start of a new page, so there is a significant top margin on page's first child which would ordinarily be "chomped".
Is there something I am doing wrong here, or can anyone suggest a method of collapsing the top margin for page first-child elements?
I've attached screenshots of the margin of the page/column first-child elements for reference.
I'm struggling to get Prince to collapse the margins on my bilingual documents and could use some assistance.
The content is a faux two column layout, structured like so:
<div class="bilingual-content">
<div class="language-column" lang="en" dir="ltr">
<h1 data-block-key="1">This is a heading</h1>
<h2 data-block-key="2">And a subheading</h2>
<p data-block-key="3">And some text.</p>
</div>
<div class="language-column" lang="ar" dir="rtl">
<h1 data-block-key="1">هذا هو العنوان</h1>
<h2 data-block-key="2">والعنوان الفرعي</h2>
<p data-block-key="3">وبعض النص.</p>
</div>
</div>
Initially I was using a flex layout:
.bilingual-content {
padding: 0mm;
margin: 0mm;
display: flex;
}
.language-column {
padding: 0mm;
margin: 0mm;
flex: 1;
display: block;
}
But have since learned in the docs that the margins are not collapsed in flex layouts, so have switched to using:
.bilingual-content {
display: table;
}
.language-column {
display: table-cell;
width: 50%;
}
My issue is that Prince is still not collapsing the top-margin for elements on the start of a new page, so there is a significant top margin on page's first child which would ordinarily be "chomped".
Is there something I am doing wrong here, or can anyone suggest a method of collapsing the top margin for page first-child elements?
I've attached screenshots of the margin of the page/column first-child elements for reference.