Let's say I have this code:
<div class="chapter">
<div class="subchapter column-span-all">
<table class="break-after-page">
...
</table>
</div>
<div class="subchapter">
...
</div>
</div>
with this CSS:
.chapter {
column-count: 2;
column-gap: 4em;
}
.subchapter.column-span-all {
column-span: all;
}
.subchapter {
break-inside: avoid-column;
-webkit-column-break-inside: avoid;
}
@media print {
break-after-page {
break-after: page
}
}
When printing now, the table doesn't get a page break after it, the next elements are printed on the same page.
If I however disable the column-*
properties for .chapter
, the table gets its own page on printing.
In the real example, I have 10 subchapters and only this one should have a page break afterwards when printing and span both columns. How can I achieve this?
Browser used is Chrome 66.