HTML to PDF / DOCX / RTF Java converter library › Forums › PD4ML Forums › Technical questions / Troubleshooting › Wrong clipping using “box-sizing:border-box” in CSS › Reply To: Wrong clipping using “box-sizing:border-box” in CSS
May 29, 2024 at 14:40
#38259
Since HTML file was rejected as attachment, here is the code:
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
* {
box-sizing:border-box;
margin:0px;
padding:0px;
}
body, td, div, b, th {
font-family: Arial, Helvetica, sans-serif;
font-size:19px;
line-height:24px;
}
td {
border: solid 1px #000000;
}
table {
border-spacing: 0;
border-collapse: collapse;
}
.fixed {
height: 500px;
overflow: hidden;
}
.page {
padding: 95px;
}
</style>
</head>
<body>
<div class="page">
<table style="width:100%">
<tr>
<td style="border:none">TEST STRING</td><td>TEST STRING</td>
</tr>
<tr>
<td>TEST STRING</td><td>TEST STRING</td>
</tr>
</table>
<br>
<div class="fixed">
<table style="width:100%">
<tr>
<td style="border:none">TEST STRING</td><td>TEST STRING</td>
</tr>
<tr>
<td>TEST STRING</td><td>TEST STRING</td>
</tr>
</table>
</div>
</div>
</body>
</html>
