Avoid a page break inside the <p> element with id="footer":
The pageBreakInside property sets or returns the page-break behavior inside an element (for printing or print preview).
Note: The pageBreakInside property has no effect on absolutely positioned elements. The page break is only visible in a print preview or when printing.
Tip: Avoid page-break properties inside tables, floating elements, and block elements with borders.
The pageBreakInside property is supported in all major browsers.
Note: Firefox, Chrome, and Safari do not support the property value "avoid".
Return the pageBreakInside property:
Set the pageBreakInside property:
Value | Description |
---|---|
auto | Insert a page break inside the element if necessary. This is default |
avoid | Avoid a page break inside an element |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | auto |
---|---|
Return Value: | A String, representing the page-break behavior inside an element when printing |
CSS Version | CSS2 |
CSS reference: page-break-inside property