Avoid page break inside paragraphs, across pages (when printing):
@media print {
p {page-break-inside: avoid;}
}
Definition and Usage
The page-break-inside property sets whether a page break is allowed inside a specified element.
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” |
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 |
