CSS page-break-after Property
Example
Always insert a page-break after a <footer> element:
@media print
{
footer {page-break-after: always;}
}
Definition and Usage
The page-break-after property adds a page-break after a
specified
element.
Note: This property is replaced by the
break-after
property!
| Default value: | auto |
|---|---|
| Inherited: | no |
| Animatable: | no. Read about animatable |
| Version: | CSS2 |
| JavaScript syntax: | object.style.pageBreakAfter="always" |
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | |||||
|---|---|---|---|---|---|
| page-break-after | 1.0 | 4.0 | 1.0 | 1.2 | 7.0 |
CSS Syntax
page-break-after: auto|always|avoid|left|right|initial|inherit;
Property Values
| Value | Description |
|---|---|
| auto | Default. Automatic page-break |
| always | Always insert a page-break after the element |
| avoid | Avoid a page-break after the element (if possible) |
| left | Insert page-break after the element so that the next page is formatted as a left page |
| right | Insert page-break after the element so that the next page is formatted as a right page |
| 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: pageBreakAfter property