CSS PAGE-BREAK-AFTER
This property specifies the page-breaking behavior that should occur after an element box and on what side of the page the content that follows should resume on. Page breaks are not allowed in absolutely positioned elements.
Example
p {
page-break-after: always
}
text in the paragraph
Possible Values
inherit: Explicitly sets the value of this property to that of the parent.
auto: Insert a page break before the element as necessary.
avoid: Avoid inserting a page break before the current element box.
left|right: left: Force one or two page breaks after the current element box until a blank left page is reached. right: Force one or two page breaks after the current element box until a blank right page is reached.
always: Always force a page break before the current element box.
{empty string]: No property value is used in this case. A page break is not inserted before the current element box.
5 Responses
So why does this only appear to work in Firefox and why do IE9 and Google Chrome ignore it (and remove all colour elements)?
please give us a graphical example of this property.
Is there option to set page height during print? I mean, say suppose the page content overflows to the next page during print, how can i scale it or make it fit into one page?
can you show me the html pls because i am not getting the output
today i am practicing from the morning but i did not even one element out put pls give me the graphical example …