Style pageBreakInside attribute
- Mwita wa kuzingatia juu pageBreakBefore
- Mwita wa kuzingatia perspective
- Rejea kwa juu Inayotaka HTML DOM Style Object
Definition and Usage
pageBreakInside
Attribute sets or returns the pagination behavior inside the element (used for printing or print preview).
Note:pageBreakInside
The attribute has no effect on absolutely positioned elements. Page breaks are only visible in print preview or when printing.
Tip:Avoid using the page break property in tables, floating elements, and bordered block elements.
See also:
CSS Reference Manual:page-break-inside attribute
Example
Avoid page breaks inside the <p> element with id="footer":
document.getElementById("footer").style.pageBreakInside = "avoid";
Syntax
Return pageBreakInside attribute:
object.style.pageBreakInside
Set pageBreakInside attribute:
object.style.pageBreakInside = "auto|avoid|initial|inherit"
Attribute value
Value | Description |
---|---|
auto | Default. Insert page breaks inside elements if necessary. |
avoid | Avoid inserting page breaks inside elements. |
initial | Sets this property to its default value. See also initial. |
inherit | Inherits this property from its parent element. See also inherit. |
Technical details
Default value: | auto |
---|---|
Return value: | String that represents the pagination behavior inside the element when printed. |
CSS Version: | CSS2 |
Mwongozo wa kusaidia
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Mwongozo | Mwongozo | Mwongozo | Mwongozo | Mwongozo |
- Mwita wa kuzingatia juu pageBreakBefore
- Mwita wa kuzingatia perspective
- Rejea kwa juu Inayotaka HTML DOM Style Object