CSS - page-break-before


Description:

The page-break-before property indicates whether (and how many) page breaks should be allowed before 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-after for a preceding element, and the value of page-break-inside for any ancestor elements.

Possible Values:

  • auto: Page breaks should be neither forced nor prevented before the element's box.
  • always: A page break should be forced before this element's box.
  • avoid: No page break should be placed before the element's box if at all possible.
  • left: Force one or two page breaks before 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 before 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-before: right;}
table {page-break-before: 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