How to set the keep-with-next property

shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

How to set the keep-with-next property

Post by shanweizhong » Tue Jun 11, 2019 7:55 am

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

Dan
Posts: 416
Joined: Mon Feb 03, 2003 10:56 am

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

Post by Dan » Tue Jun 11, 2019 3:01 pm

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

shanweizhong
Posts: 30
Joined: Mon Jul 10, 2017 2:18 am

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

Post by shanweizhong » Wed Jun 12, 2019 6:10 am

Thanks Dan. My bad. I enclosed the element that follows in the <p> tag... Please ignore my question.

Post Reply