-
-
Notifications
You must be signed in to change notification settings - Fork 705
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Repeating <thead> and <tfoot> on every page with border-collapse: collapse #76
Comments
Hi. Is there a way to turn off repeating |
@mzu Repeating on every page is the only real difference thead, tfoot { display: table-row-group } |
@SimonSapin Great, thanks. |
@mzu how did you show/ repeat headers and footers on each page?? |
Sorry to necropost, I've had to remind myself of this multiple times, so to answer @NailaAkbar00 's question: If you want table headers to repeat, it's sufficient to wrap the rows you wish to repeat in a thead tag. <!-- Contents of thead is repeated on every page by Weasyprint. -->
<!-- Default CSS includes: -->
<!-- thead { display: table-header-group; } -->
<table>
<thead>
<tr>
<th>Country</th><th>Capital</th>
</tr>
</thead>
<tbody>
<tr>
<td>France</td><td>Paris</td>
</tr>
<tr>
<td>Germany</td><td>Berlin</td>
</tr>
<tr>
<td>Italy</td><td>Rome</td>
</tr>
</tbody>
</table>
<!-- If for some reason, you don't want thead to be repeated on every page, you can use the following CSS rule: -->
<!-- thead { display: table-row-group; } --> This shows how Weasyprint behaves: http://test.weasyprint.org/suite-css21/chapter17/section2/test35/ |
Table border collapsing is annoying to do when header and footer row groups are repeated on every page. We should still do it. Later.
https://github.com/Kozea/WeasyPrint/blob/v0.19/weasyprint/formatting_structure/build.py#L507
The text was updated successfully, but these errors were encountered: