Atributo CSS page-break-inside

Definition and usage

The page-break-inside property sets the page-breaking behavior within an element.

Although it is possible to force the placement of page breaks with always, it cannot be guaranteed to avoid the insertion of page breaks. Creators can at most request that the user agent try to avoid inserting page breaks as much as possible.

Applies to:Non-floating block-level elements with position values of relative or static.

Note:Use pagination attributes as little as possible and avoid using pagination attributes in tables, floating elements, and block-level elements with borders.

See also:

HTML DOM Reference Manual:pageBreakInside attribute

Example

Sets the pagination behavior to avoid pagination within the table element:

<html>
<head>
<style>
@media print
{
table {page-break-inside:avoid;}
}
</style>
</head>
<body>
....
</body>
</html>

CSS syntax

page-break-inside: auto|avoid|initial|inherit;

Attribute value

Value Description
auto Default. Insert page breaks within elements if necessary.
avoid Avoid inserting page breaks within elements.
inherit Specifies that the page-break-inside property should be inherited from the parent element.

Technical details

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

Browser support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome IE / Edge Firefox Safari Opera
1.0 8.0 19.0 1.3 7.0