How to use HTML to print header and footer on every printed page of a document?

前端 未结 20 1664
迷失自我
迷失自我 2020-11-21 16:51

Is it possible to print HTML pages with custom headers and footers on each printed page?

I\'d like to add the word \"UNCLASSIFIED\" in Red, Arial, size 16pt to the t

20条回答
  •  野的像风
    2020-11-21 16:59

    I tried to fight this futile battle combining tfoot & css rules but it only worked on Firefox :(. When using plain css, the content flows over the footer. When using tfoot, the footer on the last page does not stay nicely on the bottom. This is because table footers are meant for tables, not physical pages. Tested on Chrome 16, Opera 11, Firefox 3 & 6 and IE6.

    
    
    
    
    Header & Footer test
    
    
    
    
    
    
    
    
    
    
    Weekday Date Manager Qty
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Mon 09/11 Kelsey 639
    Tue 09/12 Lindsey 596
    Wed 09/13 Randy 1135
    Thu 09/14 Susan 1002
    Fri 09/15 Randy 908
    Sat 09/16 Lindsey 371
    Sun 09/17 Susan 272
    Total 4923

提交回复
热议问题