Style pageBreakInside property
- Previous Page pageBreakBefore
- Next Page perspective
- Go Up One Level HTML DOM Style Object
Definition and Usage
pageBreakInside
Property sets or returns the pagination behavior within the element (used for printing or print preview).
Note:pageBreakInside
The property has no effect on absolutely positioned elements. Page breaks are only visible in print preview or when printing.
Tip:Avoid using the page break property within tables, floated elements, and bordered block elements.
See also:
CSS Reference Manual:page-break-inside property
Example
Avoid page breaks within the <p> element with id="footer":
document.getElementById("footer").style.pageBreakInside = "avoid";
Syntax
Return pageBreakInside property:
object.style.pageBreakInside
Set pageBreakInside property:
object.style.pageBreakInside = "auto|avoid|initial|inherit"
Property Value
Value | Description |
---|---|
auto | Default. Insert page breaks within the element if necessary. |
avoid | Avoid inserting page breaks within the element. |
initial | Sets this property to its default value. See initial. |
inherit | Inherits this property from its parent element. See inherit. |
Technical Details
Default value: | auto |
---|---|
Return value: | A string indicating the pagination behavior of the element's content when printed. |
CSS Version: | CSS2 |
Browser Support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Previous Page pageBreakBefore
- Next Page perspective
- Go Up One Level HTML DOM Style Object