Javascript DOM CSS Style pageBreakInside Property

Introduction

The pageBreakInside property sets or gets the page-break behavior inside an element for printing or print preview.

The pageBreakInside property has no effect on absolutely positioned elements.

The page break is only visible in a print preview or when printing.

Avoid page-break properties inside tables, floating elements, and block elements with borders.

For example

document.getElementById("footer").style.pageBreakInside = "avoid";

Property Values

Value Description
autoInsert a page break inside the element if necessary. default
avoid Avoid a page break inside an element
initial Sets this property to its default value.
inherit Inherits this property from its parent element.

The pageBreakInside return a String representing the page-break behavior inside an element when printing.




PreviousNext

Related