Reputation: 371
I'm using a print style sheet and have it set up so that every 3rd div has the class "last". From the css:
.last {
page-break-after: always;
}
So it should start a new page every 4th div. That behavior works correctly in all browsers. However, in Safari, every time I call a div with page-break-after, an extra, blank page will be printed at the end of the print. So, for example, if I'm printing 7 divs (2 with class last), I'll get two extra, blank (besides the URL/date/time in the margin) pages printed at the end of the print. The same thing will occur if I use page-break-before every 4th div.
Is there any way to avoid this behavior?
Upvotes: 2
Views: 3115
Reputation: 106
You may want to try using a separate blank div for the page break. That's the best I can do without an example of your problem.
A (better, imo) way to print pages without the arbitrary length of div's wasting blank space at the bottom would be to use a @media print that removes all styling. HTML5Boilerplate has a great @media print included in their css:
https://github.com/h5bp/html5-boilerplate/blob/master/css/style.css
(at the bottom)
Upvotes: 0