Hi all,
What I’m trying to do
So I’ve been looking everywhere for a solution to this: When I export my notes as PDF it puts page breaks wherever, even right after headings, which is really annoying.
How can I prohibit page breaks after headings in PDF export?
Things I have tried
I’ve tried various CSS snippets similar to the one below.
@media print {
h1,
h2,
h3,
h4,
h5,
h6 {
page-break-after: avoid;
break-after: avoid;
}
}
I have tried various combinations of page-break-after
and just break-after
and different types of selecting the tags, none of which did work.
Also, for some reason when verifying the selectors by using color: chocolate; !important
, the headings didn’t get colored, but using page-break-before: always
did. Maybe that has something to do with it?
Thanks in advance for any help