htmlcsspage-break

html page break adds 3 extra blank pages


When I use the page break attribute and then look at my page from i.e7 and click print preview, it generates 3 blank pages between the first and second page.

I have copied some sample code here: http://jsfiddle.net/vW54X/embedded/result/

You can't really replicate the error though because its embedded as an iframe


Solution

  • IE7 does funny things with page-break-after:always.

    Instead of applying it to your div#cl, create a new, empty p or div and apply it to that. Place that after the #cl, so

    <div id-"cl">
        //all your content
    </div>
    
    <div class="pageBreak">&nbsp;</div>
    

    Style it with page-break-after: always but hide it until print.