Welcome to WebmasterWorld Guest from

Forum Moderators: not2easy

Message Too Old, No Replies

Page break in HTML e-mail



9:19 pm on Apr 28, 2009 (gmt 0)

10+ Year Member

I'm generating a 2-part HTML e-mail. Page 1 contains a purchase order, and page 2 contains a packing list. I need to force a page break between the two.

This is what I have tried (also tried making it a P - paragraph break) and no page break occurs.

<div style="page-break-before: always"></div>

Anyone have any thoughts?


9:45 pm on Apr 28, 2009 (gmt 0)

5+ Year Member

try making it a Block element like so....

<div style="page-break-before: always; display:block;"></div>


10:08 pm on Apr 28, 2009 (gmt 0)

10+ Year Member

That was not successful. Any other ideas?


11:05 pm on Apr 28, 2009 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

Page breaks only make sense in paged media (such as print).

Some browsers really don't do paged media justice, what client are you testing with ?


11:45 pm on Apr 28, 2009 (gmt 0)

10+ Year Member

What I am specifically doing is this:

I'm working on an e-commerce application that contains support for notifying a drop shipper when a product that they sell and which is listed in a merchant's store has been sold. An e-mail is triggered by the store telling teh supplier that such a product has been sold and must be shipped to the merchant's customer.

The e-mail contains 2 parts, as mentioned above. Page 1 is a purchase order asking the drop shipper (supplier) to ship the product to the merchant's customer. Page 2 is a packing list which bears the merchant's name/address, the customer's name/address, and the purchase details. The drop shipper (supplier) is not mentioned on this.

We want that first and second pages, when printed, to be seperated so that the first can be used to fulfill the order, and the second page is placed in the package that is shipped to the customer. So I just need a silly page break to occur and it is remarkable that it is this difficult.


3:11 am on Apr 29, 2009 (gmt 0)

10+ Year Member

This strategy appears to have been successful:
<link to document showing "br.page { page-break-after: always }" removed

[edited by: swa66 at 8:02 am (utc) on April 29, 2009]
[edit reason] No links please see ToS and forum charter [/edit]


8:07 am on Apr 29, 2009 (gmt 0)

WebmasterWorld Senior Member swa66 is a WebmasterWorld Top Contributor of All Time 10+ Year Member

With "client" I meant browser, email client etc.

The problem with html and page breaks is that you'll be at the mercy of how the settings in the email client are and/or what browser is used by the email client.

Since you won't get control over what client the drop shipper is using, you're in for a lot of testing.

You still have multiple options: you could send two mime parts that they can print separately etc. But how email clients react to it is hard to predict across the board. E.g. there are still quite a few who do not read html email at all. (email used to be text only, before it all became hard to use).

Personally I'd opt for generating a pdf if you want two pages, it'll work the same in far more cases.


Featured Threads

Hot Threads This Week

Hot Threads This Month