Collapsed borders not drawn for tables in margin boxes
See original GitHub issueI made a complex document in it and I’m putting header and footer in @ top-center and @ top-bottom. The problem is that I use a simple 1-row table. On the first page everything is ok, on the second onwards ONLY the border does not work is borderless the rest everything is ok. This only occurs in the header and footer in the rest of the document is ok
First page:
Second one:
Code:
<div class="header">
<table style="border-collapse: collapse; width: 100%; height: 84px;">
<tbody class="bodyHeader">
<tr style="height: 21px;">
<td style="width: 12.1754%; height: 21px; background-color: cornflowerblue;" rowspan="4"> </td>
<td style="width: 64.5104%; height: 21px;" rowspan="2"> </td>
<td style="width: 19.905%; height: 21px;"> </td>
</tr>
<tr style="height: 21px;">
<td style="width: 19.905%; height: 21px;"> </td>
</tr>
<tr style="height: 21px;">
<td style="width: 64.5104%; height: 21px;" rowspan="2"> </td>
<td style="width: 19.905%; height: 21px;"> </td>
</tr>
<tr style="height: 21px;">
<td style="width: 19.905%; height: 21px;"> </td>
</tr>
</tbody>
</table>
</div>
div.header {
/* display: block; */
width: 100%;
position: running(header);
margin: 0mm;
padding: 0mm;
}
@page iretrato{
size: A4;
margin: 2cm;
margin-top: 3.5cm;
@top-center {
vertical-align: top;
margin: 0mm;
padding-top: 1cm;
content: element(header);
width: 100%;
}
@bottom-center {
content: element(footer);
}
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
border-collapse - CSS: Cascading Style Sheets | MDN
The border-collapse CSS property sets whether cells inside a have shared or separate borders.
Read more >Simulating border-collapse in lists (no tables) - Stack Overflow
Show activity on this post. Here's how I solved it: add a margin-left/-top of -1px to each li element. Then the borders really...
Read more >border-collapse | CSS-Tricks
The border-collapse property is for use on <table> elements (or elements made to behave like a table through display: table or display: ...
Read more >The Box Model of a Collapsed Table Border - Fantasai
The solution is simply to take the difference between the widest collapsed border width and the table's border width and add it to...
Read more >8 Box model - W3C
The margin, border, and padding can be broken down into top, right, bottom, and left ... other than 'visible') do not collapse with...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The good workaround involves using div tags instead of tables. I.e:
Divs do not use border-collapse property and do not have this problem.
Thanks a lot for taking the time to find this!
It definitely is, let’s keep this issue open.