Log in

View Full Version : Print Help



johnnyi
10-12-2005, 03:44 PM
Hello all,

I have an HTML page that is a large web form intended to be printed (approx. 5 pgs.). My question is this: Is there a way to insert break points in my HTML code that tell the printer to start printing a new page at this point - essentially a printer page break [similar to MS Word]?

Please let me know if you need me to elaborate any further.

Thanks,

- I

mwinter
10-13-2005, 01:28 PM
Is there a way to insert break points in my HTML code that tell the printer to start printing a new page at this point - essentially a printer page break [similar to MS Word]?You can using CSS, but not all browsers may have proper support for paged media (http://www.w3.org/TR/REC-CSS2/page.html) (I think Opera's is the best).

Mike

johnnyi
10-17-2005, 06:20 PM
I actually found the tag for this... all you need to do is insert the following tag anywhere where you want the new page to begin:


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

mwinter
10-17-2005, 08:15 PM
I actually found the tag for this...There is no tag for this.



<div style="page-break-after:always"></div>That uses CSS, just as I wrote, and what I linked to. However, any page-break-* declaration should be included in a separate print style sheet. It should also be applied to an existing element, not stuffed into an artificial one.

Mike