How to avoid the page break properly
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 23
- Joined: Thu Feb 28, 2019 2:19 pm
How to avoid the page break properly
Hi!
I've defined a CSS rule for 2-nd level heading as the following:
*[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
page-break-before:always;
}
and it works.
Now, I have one 2-nd level topic I want to keep on the same page with it's senior one.
I prepared
*[outputclass ~= "no_page_break_before"] > * {
page-break-before:avoid;
}
and placed it into bookmap:
</chapter>
<chapter href="concept/c_00_features.dita">
<topicref outputclass="no_page_break_before" href="concept/c_nn_activities_and_functions.dita"/>
<topicref href="concept/c_nn_sw_and_hw_requirements.dita"/>
</chapter>
but page break still exists.
What is wrong?
Thanks,
Dmitry
I've defined a CSS rule for 2-nd level heading as the following:
*[class~="topic/topic"] *[class~="topic/topic"] > *[class~="topic/title"] {
page-break-before:always;
}
and it works.
Now, I have one 2-nd level topic I want to keep on the same page with it's senior one.
I prepared
*[outputclass ~= "no_page_break_before"] > * {
page-break-before:avoid;
}
and placed it into bookmap:
</chapter>
<chapter href="concept/c_00_features.dita">
<topicref outputclass="no_page_break_before" href="concept/c_nn_activities_and_functions.dita"/>
<topicref href="concept/c_nn_sw_and_hw_requirements.dita"/>
</chapter>
but page break still exists.
What is wrong?
Thanks,
Dmitry
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: How to avoid the page break properly
Hello,
There could be rules with higher specificity selectors that overwrite the one you are using.
Therefore, first thing you should try is add the "!important" declaration to your property, like: and see if this changes anything.
Best Regards,
Costin
There could be rules with higher specificity selectors that overwrite the one you are using.
Therefore, first thing you should try is add the "!important" declaration to your property, like:
Code: Select all
*[outputclass ~= "no_page_break_before"] > * {
page-break-before:avoid !important;
}
Best Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ 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