More information about the Underscore mailing list

[_] Pagebreaks in printed webpage

Martin Moore martinm at
Fri Feb 8 17:29:27 GMT 2013

I finally got it working - the CSS never did work, but used something very
similar to get it working when printing the page :

    { page-break-after : always } ;

Not sure what the second } does but it appears to be needed !?

What I was missing was adding the html header/footer and CSS to the string
sent to the print window when printing only parts of the page.

Works fine now.



-----Original Message-----
From: underscore-bounces at
[mailto:underscore-bounces at] On Behalf Of Owen
Sent: 08 February 2013 17:21
To: underscore at
Subject: Re: [_] Pagebreaks in printed webpage

On 7 Feb 2013, at 14:53, Martin Moore wrote:

> Today's ]_] hair-puller....
> I need to be able to print some content from a page with page breaks 
> at certain points.
> Seems simple enough, but can I get it to work ?!*&! No...
> Needs to work on IE8+, Firefox. Safari would be nice.
> My test code is at
> What do I need to do?

Code is good, that's what I've used before. It works in Chrome, Safari,
Firefox on Mac. I didn't your demo in IE though.

I found that 'page-break-after' is more unreliable than 'page-break-before'
but that's what you're using already.
underscore_ list info/archive ->
No virus found in this message.
Checked by AVG -
Version: 2013.0.2897 / Virus Database: 2639/6085 - Release Date: 02/06/13