page-break-after property
Specifies whether a page break occurs after the object when printing.
This property doesn't take any effect on absolutely positioned elements.
The page break is only visible in a print preview or when printing.
If you need other page breaking rules, use the page-break-before and page-break-inside properties.
JavaScript page for this property: pageBreakAfter. You can find other example(s) there. |
Possible values:
One of the following values:
Always force a page break after the element. | |||||||
Default. Insert a page break after the element when necessary. | |||||||
Avoid a page break after the current element. | |||||||
Page break is not inserted after the element. | |||||||
Takes the value of this property from the computed style of the parent element. | |||||||
Force one or two page breaks after the current element, so that the next page is considered a left page. | |||||||
Force one or two page breaks after the current element, so that the next page is considered a right page. |
Default: auto.
Example HTML code 1:
This example illustrates the use of the page-break-after property:
|
||||
<head> <style> .example { page-break-after: always; } </style> </head> <body> Please open the print preview to see the result! <p class="example">page break after this element</p> text content </body> |
||||
|
||||
Did you find this example helpful?
|
Supported by tags:
address, blockQuote, body, caption, center, dd, dir, div, dl, dt, fieldSet, form, H1, H2, H3, H4, H5, H6, input:file, input:password, input:search, input:text, isIndex, legend, li, listing, marquee, menu, ol, p, plainText, pre, table, textArea, tr, ul, xmp
Related pages:
External links:
page-break-after (MSDN)
page-break-after (Mozilla Developer Center)
page-break-after (Safari Reference Library)
page-break-after (W3C)
page-break-after (Mozilla Developer Center)
page-break-after (Safari Reference Library)
page-break-after (W3C)
User Contributed Comments