CSS page-break-inside Property
Example
Avoid page-break inside <pre> and <blockquote> elements:
@media print {
pre, blockquote {page-break-inside: avoid;}
}
Definition and Usage
The page-break-inside
property sets whether a page-break should be avoided inside a specified element.
Tip: The properties: page-break-before, page-break-after and page-break-inside help to define how a document should behave when printed.
Note: You cannot use this property on absolutely positioned elements.
Default value: | auto |
---|---|
Inherited: | no |
Animatable: | no. Read about animatable |
Version: | CSS2 |
JavaScript syntax: | object.style.pageBreakInside="avoid" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
Property | |||||
---|---|---|---|---|---|
page-break-inside | 1.0 | 8.0 | 19.0 | 1.3 | 7.0 |
CSS Syntax
page-break-inside: auto|avoid|initial|inherit;
Property Values
Value | Description |
---|---|
auto | Default. Automatic page-breaks |
avoid | Avoid page-break inside the element (if possible) |
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Related Pages
HTML DOM reference: pageBreakInside property
Copyright 1999-2023 by Refsnes Data. All Rights Reserved.