Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Having a footer on each page

Status
Not open for further replies.

okiiyama

IS-IT--Management
Jan 3, 2003
269
US
I can't gaurantee to have all data print to 1 page, and I need an icon (.jpg) to print on each page. I am wondering if there was a way I could create a footer that would go on each page, and be able to print. Is this possible, or is there another way to make sure that the icon would be on all printed pages?

Thanks.
 
The problem is it is difficult to tell where the page will break. You can estimate about where if you assume a paper size and the fonts and such in the browser, but I'm betting that's not the solution you are looking for.

If you use the print style sheet to help streamline your design, you can use the pageBreakAfter property to ensure your footer is the last thing printed. Sadly, this only works for IE, and it still doesn't help you automatically add a footer for printing (still some page size guess work involved).

Maybe someone else can think of something more useful, but that's at least hopefully a start.
 
Actually the code oppcos mentioned works in firefox too, so you would probably have 99% of your bases covered.
You would need to set the font-size in pixels (eg. font-size:12px) and insert the divs manually.

Code:
<div style="page-break-after:always">
<img src="footer.img" />
</div>

Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top