CSS page-break-after property
Set the peddle behavior that is always pedded after the table element:
<head>
<style>
@media print
{
table {page-break-after:always}
}
</style>
</head>
<body>
....
</body>
</html>
Description of property definition and use
The page-break-after property sets the page-break behavior after the element.
Note: You cannot use this property for absolutely positioned elements.
Note: Use plicing properties as little as possible, and avoid using peddle properties in tables, floating elements, block elements with borders.
Default: | auto |
---|---|
Inherited: | no |
Version: | CSS2 |
JavaScript syntax: | object .style.pageBreakAfter="always" |
Browser support
Page-break-after properties are supported by all major browsers.
Note: Any version of Internet Explorer (including IE8) supports property values "left," "right," and "inherit."
Note: Firefox, Chrome and Safari do not support property values "avoid," "left" and "right."
The property value
Value | Describe |
---|---|
auto | Default. Insert a page break after the element if necessary. |
always | Insert a page break after the element. |
avoid | Avoid inserting page breaks after elements. |
left | After the element there are enough page breaks until a blank left page. |
right | After the element there are enough page breaks until a blank right page. |
inherit | Specifies that the settings of the page-break-after property should be inherited from the parent element. |