Hi,
I am using position: absolute to place a counter lined up before an indented paragraph (DITA step). This works nicely most of the time but on occasion I get a page break between the counter and the content.
This page break feels like not quite correct behaviour from Prince, but I'm not expert enough in CSS to know. I'm also sure there's a better way to place a number before an indented paragraph that avoids this issue, but I haven't figured it out either. Suggestions welcome. Thanks
I am using position: absolute to place a counter lined up before an indented paragraph (DITA step). This works nicely most of the time but on occasion I get a page break between the counter and the content.
steps {
counter-reset: step-counter;
}
step::before {
position: absolute;
content: counter(step-counter);
counter-increment: step-counter;
font-weight: 500;
left: 100pt;
page-break-after: avoid;
}
step {
display: block;
margin-bottom: 5pt;
margin-left: 10pt;
page-break-after: avoid;
}
This page break feels like not quite correct behaviour from Prince, but I'm not expert enough in CSS to know. I'm also sure there's a better way to place a number before an indented paragraph that avoids this issue, but I haven't figured it out either. Suggestions welcome. Thanks