CSS page-break-afterProperty
Example
Always insert a page break after the <footer> element:
@media print {
footer {page-break-after: always;}
}
Property definition and usage instructions
The page-break-after property is used to set whether to insert a page break after a specified element.
Note:You cannot use this property on absolutely positioned elements.
Note:Please use pagination properties as sparingly as possible, and avoid using pagination properties in tables, floating elements, and block elements with borders.
| Default value: | auto |
|---|---|
| Inherited: | no |
| version: | CSS2 |
| JavaScript Syntax: | object.style.pageBreakAfter="always" |
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the page-break-after property.
Note:Any version of Internet Explorer (including IE8) supports the property values "left", "right", and "inherit".
Note:Firefox, Chrome, and Safari do not support the property values 'avoid', 'left', and 'right'.
Property value
| Value | Description |
|---|---|
| auto | Default. Inserts a page break after the element if necessary. |
| always | Insert a page break after the element. |
| avoid | Avoid inserting a page break after the element. |
| left | Insert enough page breaks after the element until a blank left page is reached. |
| right | Insert enough page breaks after the element until a blank right page is reached. |
| inherit | Specifies that the page-break-after property settings should be inherited from the parent element. |