We're using ::before pseudo elements for outputting counters for list items.
How can we stop a page break between the pseudo element and the list item?
(b)
===== Page break ====
text of list item
I've tried using
Any ideas on what we could do?
ol > li:before {
position: absolute;
left: -3em;
counter-increment: item;
content: counter(item) " "; }
How can we stop a page break between the pseudo element and the list item?
(b)
===== Page break ====
text of list item
I've tried using
.li::before{ page-break-inside: avoid}
and .li::before{ page-break-after: avoid}
but they don't make any difference.Any ideas on what we could do?