homepage Welcome to WebmasterWorld Guest from 23.20.61.85
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Page break in HTML e-mail
gbdg

5+ Year Member



 
Msg#: 3902741 posted 9:19 pm on Apr 28, 2009 (gmt 0)

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?

 

CSS_Kidd

5+ Year Member



 
Msg#: 3902741 posted 9:45 pm on Apr 28, 2009 (gmt 0)

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

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

gbdg

5+ Year Member



 
Msg#: 3902741 posted 10:08 pm on Apr 28, 2009 (gmt 0)

That was not successful. Any other ideas?

swa66

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



 
Msg#: 3902741 posted 11:05 pm on Apr 28, 2009 (gmt 0)

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 ?

gbdg

5+ Year Member



 
Msg#: 3902741 posted 11:45 pm on Apr 28, 2009 (gmt 0)

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.

gbdg

5+ Year Member



 
Msg#: 3902741 posted 3:11 am on Apr 29, 2009 (gmt 0)

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]

swa66

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



 
Msg#: 3902741 posted 8:07 am on Apr 29, 2009 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved