Page-Break-Before

Adjust page breaks before the current element.

      Page-Break-Before: auto | always | avoid | left | right ;

auto - Automatic page breaks (neither forced nor forbidden).
always - Always force page breaks before the element.
avoid - Avoid page breaks before the element (no Firefox support).
left - Force page breaks before the element so that the next page is formatted as a left page (no Firefox support).
right - Force page breaks before the element so that the next page is formatted as a right page (no Firefox support).

Page breaks will only be visible when the page is printed, or in print preview.

Page breaks may fail to work if added inside tables, floating elements, inline-block elements, and block elements with borders.

Examples:
body { Page-Break-Before: always; }
.ss64class { Page-Break-Before: avoid; }

#SS64id { Page-Break-Before: always; }

Try it:

If a page break is applied to this text, the effect should be visible in print preview.

Browser Support: All major browsers. (CSS 2.1)

“Wall Street and the City Spivs, together with their sycophantic friends in the media, are all part of a big club, and you ain't in it” ~ George Carlin

Related:

page-break-after - Adjust page breaks after the current element.


© Copyright SS64.com 1999-2014
Some rights reserved