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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing a footer on each page 1

Status
Not open for further replies.

emms

Programmer
Jan 11, 2001
55
GB
is there any way we can produce a long list of data and when it is printed a footer appears on the bottom of every page? (so appears at print but not on the screen)

at the moment it's set up to write so many records, then the footer and a pagebreak.

this would be so much easier if there was some sort of footer class.

any ideas?

thanks for any help

Emma
 
Hi Emma,

Do you use tables for you records? If yes, there is the <tfoot> tag. This tag is supposed to appear only once on the screen, but on every page when printed.

Here is an abstract of the w3c web site:
&quot;The THEAD, TFOOT and TBODY elements provide a convenient means for controlling rendering. If the table has a large number of rows in the body, user agents may choose to use a scrolling region for the table body sections. When rendering to a paged device, tables will often have to be broken across page boundaries. The THEAD, TFOOT and TBODY elements allow the user agent to repeat the table foot at the bottom of the current page, and then the table head at the top of the new page before continuing on with the table body&quot;.

I hope this helps.

Cheers,

Xavier
 
its a very good idea, and would be great if it worked!!

i'm using ie 6 and it doesn't seem to support it.

thanks for your help though :)
 
Hi Emms,

It's working fine for Mozilla based-browsers (Netscape 6 and Mozilla).

For Internet Explorer, you must add the following css:
style=&quot;display : table-footer-group;&quot;

So, for instance:
<TFOOT style=&quot;display : table-footer-group;&quot;>
<TR> <TH ALIGN=LEFT COLSPAN=3>Total</TH> <TH>4923</TH> </TR>
</TFOOT>

It should work fine now with both IE 5 and IE6.

I hope it's working for you too now (if you have time, please let me know).

Cheers,

xso

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top