Forum How do I...?

table headers question on second page

jccameron
Okay, quick question to see if it is possible.

I want to know if there is any way to define the table headers and content such that the following happens:

PAGE 1:

table header
table row 1
table sub-header
rest of table

PAGE 2 - X:

table header
table sub-header
table continued...

In short, I want the second row of the table to be basic content, third-row to be a table-header, and then on subsequent pages, have the header and sub-header at the top of the table.

This assumes one table and I don't know when it will end and it will be more than one page.

Any ideas?
mikeday
In general, this doesn't fit in with the HTML/CSS table model, which assumes a repeating table header followed by the table body, which cannot be interleaved. You might be able to fake it with use of the <caption> element, which repeats, and the prince-caption-page property, which can control which of multiple captions is used, eg.
<table>
<caption style="prince-caption-page: first">First page table caption</caption>
<caption style="prince-caption-page: following">Following pages caption</caption>
<tbody>...</tbody>
</table>

To make this work you would need to include your first row of the table inside the first caption as a separate table in its own right.
vicky
I am trying to repeat some of the table rows when there is a page break occurs inside of the table. As suggest by you i am using the code given as follow
   <table>
   <caption style="prince-caption-page: all"><tr><td>Testing 1</td></tr></caption>
   <tbody>...</tbody>
   </table>

But unfortunately i didn't get the expected result...how do i repeat some of the table rows in all pages...
give your valuable reply
mikeday
Table captions are just blocks, and don't include rows. Can you use <thead> instead?
vicky
ya it works...thank you ...

Edited by vicky