English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
page-break-The inside CSS attribute forces or prohibits pagination symbols inside elements. This attribute applies to generating boxes.Block-levelElement. It does not apply to empty <p>, and does not generate a blank box.
The following table provides usage instructions and version history of this attribute, as well as its syntax in JavaScript scripts.
Default value: | auto |
---|---|
Applies to: | Block-level elements |
Inheritance: | None |
Animatable: | No.Please see Animation properties. |
Version: | CSS 2,3 |
The syntax of this attribute is as follows:
page-break-inside: auto | avoid | initial | inherit
The following example demonstrates how to use page-break-inside attribute.
@media print { ul { page-break-inside: avoid; } }Test to see‹/›
The style rules in the above example set the pagination behavior to avoid splitting the unordered list into two pages.
Note:this page-break-The inside attribute is only applicable to root elements ortable-rowin the normal flow of theBlock-levelElement.
The following table describes the values of this attribute.
Value | Description |
---|---|
auto | If necessary, insert a pagination symbol inside the element. This is the default value. |
avoid | Avoid pagination inside elements. |
initial | Set this attribute to its default value. |
inherit | If specified, the associated elements will use their parent element's page.-break-inside attribute values. |
page-break-insideFirefox does not support this attribute.
|
Warning:Avoid using this attribute as it is not well supported. Also, use pagination symbols as little as possible and avoid pagination inside table elements with borders, floating elements, and block elements.
Please refer to the following tutorials:CSS Media Types.
Related attributes:page-break-after,page-break-before.