CSS page-break-after Property

CSS page-break-after property adjusts page breaks after the current element.

Usages

The following table outline the usages and version history of this property.

Default value: auto
Applies to: Block-level elements
Inherited: No
Version: CSS2
JavaScript Syntax: object.style.pageBreakAfter = "avoid"

Syntax

Here is a syntax for the CSS page-break-after property

page-break-after: auto | always | avoid | left | right | initial | inherit;

Property Values

The following table describes the values of this property.

Value Description
auto Default. Automatic page-break
always page-break insert after the element
avoid If possible avoid page-break after the element
left page-break insert after the element so that next page is formatted as a left page
right page-break insert after the element so that next page is formatted as a right page
initial Sets default value of this property
inherit Inherits this property from its parent element

Examples

The example below shows to sets page-break-after property.

@media print {
  footer {
    page-break-after: always;
  }
}

Browser Compatibility

  • Google Chrome 1+
  • Mozilla Firefox 1+
  • Internet Explorer 4+
  • Opera 7+
  • Safari 1.2+

Note: Here details of browser compatibility with version number may be this is bug and not supported. But recommended to always use latest Web browser.