CSS PAGE-BREAK-BEFORE
This property specifies the page-breaking behavior that should occur before an element box and on what side of the page the content that follows should resume on. Page breaks are not allowed in absolutely positioned elements.
CSS "suggests" when page-breaking should occur:
- It should occur as few times as possible.
- It should be avoided in these elements: tables, floated elements, and block elements with borders.
- Pages that are not forced to break should have approximately the same height.
Example
p {
page-break-before: always
}
Text in the paragraph
>
Possible Values
inherit: Explicitly sets the value of this property to that of the parent.
auto: Insert a page break before the element as necessary.
avoid: Avoid inserting a page break before the current element box.
left|right: left: Force one or two page breaks before the current element box until a blank left page is reached. right: Force one or two page breaks before the current element box until a blank right page is reached.
always: Always force a page break before the current element box.
{empty string]: No property value is used in this case. A page break is not inserted before the current element box.
Go Back