Shade box page break padding
Having trouble installing Oxygen PDF Chemistry? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Tue Apr 08, 2025 7:32 pm
Shade box page break padding
I am using Oxygen 27.1 and Chemistry 27.1. I have some content in a div that is styled to have a gray background. Sometimes that content with the gray background is too long for one page and rolls over to a new page. The break at the bottom of the first page leaves the content too tight to the bottom edge of the gray box and the content on the next page leaves the content too close to the top of the gray box. How can I add padding to the content break for this naturally occurring page break so the gray box isn't so tight to the text?
Leigh
2025-08-25_16-48-00.png
Thanks,Leigh
You do not have the required permissions to view the files attached to this post.
-
- Posts: 707
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Shade box page break padding
Post by julien_lacour »
Hello Leigh,
Unfortunately, CSS does not provide a way to apply padding/margin inside an element split by a page break.
If you are using DITA and the DITA Map PDF - based on HTML5 & CSS scenario, as a workaround you could mark the split paragraph with @outputclass="page-break-avoid" so it will be move into the next page, then change the default paragraphs margins in padding:
For more information about force page-breaks you can check our user guide.
Regards,
Julien
Unfortunately, CSS does not provide a way to apply padding/margin inside an element split by a page break.
If you are using DITA and the DITA Map PDF - based on HTML5 & CSS scenario, as a workaround you could mark the split paragraph with @outputclass="page-break-avoid" so it will be move into the next page, then change the default paragraphs margins in padding:
Code: Select all
*[class ~= "topic/p"] {
margin-top: 0;
margin-bottom: 0;
padding-top: 1em;
padding-bottom: 0.5em;
}
Regards,
Julien
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service