CSS for print : properties, descriptions, values en W3C ref

PropertyDescriptionValuesW3C
orphansSets the minimum number of lines for a paragraph that must be left at the bottom of a pagenumber2
marksSets what sort of marks should be rendered outside the page boxnone
crop
cross
pageSets a page type to use when displaying an elementauto
identifier
2
page-break-afterSets the page-breaking behavior after an elementauto
always
avoid
left
right
2
page-break-before

Sets the page-breaking behavior before an element

auto
always
avoid
left
right
2
page-break-insideSets the page-breaking behavior inside an elementauto
avoid
2
sizeSets the orientation and size of a pageauto
portrait
landscape
widowsSets the minimum number of lines for a paragraph that must be left at the top of a pagenumber2

 

 

 

The page-break-after property sets the page-breaking behavior after an element.

Note: You can not use this property on absolutely positioned elements.

Note: Use the page-breaking properties as few times as possible and avoid page-breaking properties inside tables, floating elements, and block elements with borders.

Inherited: No

Example

table

page-break-after: always
}

Possible Values

ValueDescription
autoInsert a page break after the element if necessary
alwaysInsert a page break after the element
avoidAvoid inserting a page break after the element
leftInsert page breaks after the element until it reaches a blank left page
rightInsert page breaks after the element until it reaches a blank right page

 

 

 

 

The page-break-before property sets the page-breaking behavior before an element.

Note: You can not use this property on absolutely positioned elements.

Note: Use the page-breaking properties as few times as possible and avoid page-breaking properties inside tables, floating elements, and block elements with borders.

Inherited: No

Example

table

page-break-before: always
}

Possible Values

ValueDescription
autoInsert a page break before the element if necessary
alwaysInsert a page break before the element
avoidAvoid inserting a page break before the element
leftInsert page breaks before the element until it reaches a blank left page
rightInsert page breaks before the element until it reaches a blank right page

 

 

The page-break-inside property sets the page-breaking behavior inside an element.

Note: You can not use this property on absolutely positioned elements.

Note: Use the page-breaking properties as few times as possible and avoid page-breaking properties inside tables, floating elements, and block elements with borders.

Inherited: No

Example

p

page-break-inside: avoid
}

Possible Values

ValueDescription
autoInsert a page break inside the element if necessary
avoidAvoid inserting a page break inside the element

Más sobre este tema

Scroll to Top