CSS break-after property
- Previous page box-sizing
- Next Page break-before
Definition and Usage
The break-after property specifies whether pagination (page-break), column break (column-break), or region break (region-break) should occur after the specified element.
The break-after property extends the page-break-after property of CSS2.
By using the break-after property, you can inform the browser to break the page, column, or region after the element with the break-after attribute, or to avoid splitting the element and spanning two pages.
Example
Always insert a page break before the <footer> element.
@media print { footer { break-after: always; } }
CSS syntax
break-after: auto|all|always|avoid|avoid-column|avoid-page|avoid-region|column|left|page|recto|region|right|verso|initial|inherit;
Property value
Value | Description |
---|---|
auto | Default. Automatically paginate, columnize, and regionize after the element. |
all | Always insert a page break immediately after the main frame. |
always | Always insert a page break after the element. |
avoid | Avoid page, column, and region breaks after the element. |
avoid-column | Avoid column division after the element. |
avoid-page | Avoid page division after the element. |
avoid-region | Avoid region division after the element. |
column | Always insert a column separator after the element. |
left | Insert one or two page breaks after the element to format the next page as a left page. |
page | Always insert a page break after the element. |
recto | Insert one or two page breaks after the main frame to format the next page as a recto page. |
region | Always insert a region separator after the element. |
right | Insert one or two page breaks after the element to format the next page as a right page. |
verso | Insert one or two page breaks after the main frame to format the next page as a verso page. |
initial | Set this property to its default value. See initial. |
inherit | Inherit this property from its parent element. See inherit. |
Technical details
Default value: | auto |
---|---|
Inheritance: | No |
Animation creation: | Not supported. See:Animation-related properties. |
Version: | CSS3 |
JavaScript syntax: | object.style.breakAfter="always" |
More examples
Example
Always insert a page break after the element with id "toc":
@media print { #toc { break-after: always; } }
Example
Always insert a region separator after the <ul> element within a certain region:
.region ul { break-after: region; } }
Browser support
The numbers in the table indicate the first browser version that fully supports this property.
Chrome | IE / Edge | Firefox | Safari | Opera |
---|---|---|---|---|
50.0 | 10.0 | 65.0 | 10.0 | 37.0 |
- Previous page box-sizing
- Next Page break-before