Dofactory.com
Dofactory.com
Earn income with your CSS skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

CSS page-break-after

The page-break-before property adds a page-break after an element.

This property is used to control the printing of an HTML document.

It does not work with absolute positioned elements or empty <div> elements.

Example

#

During printing a page break is added after the <footer> element.

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

Syntax

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

Values

#

Value Description
auto Default. Automatic page-break
always Insert a page-break after the element
avoid Avoid a page-break after the element, if possible
left Insert a page-break before the element so that the next page is formatted as a left page
right Insert a page-break after the element so that the next page is formatted as a right page
initial Sets the value to its default value
inherit Inherits the value from its parent element

Browser support

This table shows when page-break-after support started for each browser.

Chrome
1.0 Dec 2008
Firefox
1.0 Nov 2004
IE/Edge
4.0 Sep 1997
Opera
7 Jan 2003
Safari
1.0 Jun 2003

You may also like


Last updated on Sep 30, 2023

Earn income with your CSS skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides