Skip to content

Printing with CSS Page Breaks in Internet Explorer

If you’re trying to get

page-break-after: always;

to work in Internet Explorer, here’s a tip.

It doesn’t work well inside of a nested div. I was trying to page break between ascx user controls which housed each of their contents in a panel. In order to get this to work, I had to put the page break css class on the ASP Panel tag, instead of on a div inside it.

So to sum up, use:

<asp:Panel ID="myPanel" runat="server" CssClass="break">


<asp:Panel ID="myPanel" runat="server">
    <div class="break"><!-- This will do nothing in Internet Explorer --></div>
Published inPosts