Page 1 of 1

How to set the keep-with-next property

Posted: Tue Jun 11, 2019 7:55 am
by shanweizhong
Hi guys,

I'm using Oxygen Author 21.1 and the "DITA Map PDF - based on HTML5 & CSS" transformation.

There are many occasions that I want a paragraph to stay with the next element. For example, an introductory sentence and the list or table below it. I tried to add the following code in my CSS template but it did not work:

Code: Select all

*[outputclass ~= "keep-with-next"] {
	page-break-after:avoid;
}

Code: Select all

<p outputclass="keep-with-next">New features in this release are as follows:</p>
Can any of you give me a hand?

Cheers,
Michael

Re: How to set the keep-with-next property

Posted: Tue Jun 11, 2019 3:01 pm
by Dan
Hello Michael,

This looks like a bug. Can you tell us what element is following the p element? A DITA snipped would be good.

Many regards,
Dan

Re: How to set the keep-with-next property

Posted: Wed Jun 12, 2019 6:10 am
by shanweizhong
Thanks Dan. My bad. I enclosed the element that follows in the <p> tag... Please ignore my question.