Style pageBreakAfter attribute
- Forrige side paddingTop
- Næste side pageBreakBefore
- Gå tilbage til forrige niveau HTML DOM Style Object
Definition and Usage
The pageBreakAfter attribute sets or returns the pagination behavior after the element (used for printing or print preview).
Note:pageBreakAfter
The attribute has no effect on absolutely positioned elements. Pagination symbols are only visible in print preview or when printing.
See also:
CSS Reference Manual:page-break-after attribute
Example
Always set a pagination symbol after each <p> element with id="footer":
document.getElementById("footer").style.pageBreakAfter = "always";
Syntax
Return pageBreakAfter attribute:
object.style.pageBreakAfter
Set pageBreakAfter attribute:
object.style.pageBreakAfter = "auto|always|avoid|emptystring|left|right|initial|inherit"
Attribute value
Value | Description |
---|---|
auto | Insert a pagination symbol after the element if necessary. Default. |
always | Always insert a pagination symbol after the element. |
avoid | Avoid inserting a pagination symbol after the element. |
"" (empty string) | Do not insert a pagination symbol after the element. |
left | Insert enough pagination symbols after the element until a blank left page. |
right | Insert enough pagination symbols after the element until a blank right 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 |
---|---|
Return value: | A string indicating the pagination behavior of the element when printed. |
CSS version: | CSS2 |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
- Forrige side paddingTop
- Næste side pageBreakBefore
- Gå tilbage til forrige niveau HTML DOM Style Object