Easy Tutorial
❮ Css3 Pr Align Content Func Hsl ❯

CSS page-break-inside Property

Example

Avoid inserting a page break inside <pre> and <blockquote> elements:

@media print {
    pre, blockquote {page-break-inside: avoid;}
}

Property Definition and Usage

The page-break-inside property is used to set whether a page break should be inserted inside a specified element.

Note: You cannot use this property on absolutely positioned elements.

Note: Use page break properties sparingly and avoid using them inside tables, floating elements, and block elements with borders.

Default value: auto
Inherited: no
--- ---
Version: CSS2
--- ---
JavaScript syntax: object.style.pageBreakInside="avoid"
--- ---

Browser Support

All major browsers support the page-break-inside property.

Note: IE8 and earlier versions do not support the "inherit" value.

Note: Firefox, Chrome, and Safari do not support the "avoid" value.


Property Values

Value Description
auto Default. Inserts a page break inside the element if necessary.
avoid Avoids inserting a page break inside the element.
inherit Specifies that the value of the page-break-inside property should be inherited from the parent element.
❮ Css3 Pr Align Content Func Hsl ❯