CSS - page-break-after


Description:

The page-break-after property indicates whether (and how many) page breaks should be allowed after an element's box.

The value of this property is not the sole factor in determining whether a page break should follow the element. This decision will also be affected by the value of page-break-before for a following element, and the value of page-break-inside for any ancestor elements.

Possible Values:

  • auto: Page breaks should be neither forced nor prevented after the element's box.
  • always: A page break should be forced after this element's box.
  • avoid: No page break should be placed after the element's box if at all possible.
  • left: Force one or two page breaks after the element's box, such that the next page on which an element is printed will be a left-hand page
  • right: Force one or two page breaks after the element's box, such that the next page on which an element is printed will be a right-hand page.

Applies to:

All the block level elements

Example:

Here is the example:

<style tyle="text/css">
<!--
h1 {page-break-after: avoid;}
div.summary {page-break-after: always;}
-->
</style>
     





Spacer Bottom Left Corner ImageBottom Right Corner Image
Valid XHTML 1.0 Strict  Valid CSS! Check the accessibility of this site according to U.S. Section 508