Alex Rivera | Logout

Repeat table headers in print mode

Asked 2008-11-08T01:12:35.757
140

Is it possible in CSS using a property inside an @page to say that table headers (th) should be repeated on every page if the table spreads over multiple pages?

Edit
Report

2 Answers

89

Some browsers repeat the thead element on each page, as they are supposed to. Others need some help: Add this to your CSS:

thead {display: table-header-group;}
tfoot {display: table-footer-group;}

Opera 7.5 and IE 5 won't repeat headers no matter what you try.

(source)

answered 2008-11-08T01:37:15.050
52

Flying Saucer xhtmlrenderer repeats the THEAD on every page of PDF output, if you add the following to your CSS:

        table {
            -fs-table-paginate: paginate;
        }

(It works at least since the R8 release.)

answered 2010-04-13T22:57:23.993

Your Answer