I cannot get page breaks into my pdf using css and prince. The second table touches the first one. What am I doing wrong? I think I may have misunderstood how to use instructions for print in css, from my perspective it looks like I'm doing exactly what the user guide is telling me (link)
My code is as follows:
@page { size: 210mm 297mm;
}
chapter {page-break-before: always;}
table.page{
width:14cm;
font-family:"Times New Roman";
font-size: 12pt;
border: 1px solid black;
text-align:justify;
padding:0;
margin:0;
}
td.number{
width:1.8cm;
font-family:"Times New Roman" ;
font-size: 12pt;
text-align:justify;
padding:0;
margin:0;
}
td.content{
width:12cm;
font-family:"Times New Roman";
font-size: 12pt;
text-align:justify;
padding:0;
margin:0;
}
<body>
<chapter>
<table class="page">
<tr>
<td colspan="2">
<h1>Title </h1>
</td>
</tr>
<tr>
<td class="number">
<div>1</div>
</td>
<td class="content">
<div>this is some text</div>
</td>
</tr>
</table>
</chapter>
<chapter>
<table class="page">
<tr>
<td colspan="2">
<h1>Title 2</h1>
</td>
</tr>
<tr>
<td class="number">
<div>2</div>
</td>
<td class="content">
<div>this is some more text</div>
</td>
</tr>
</table>
</chapter>
</body>