【发布时间】:2018-08-20 21:32:14
【问题描述】:
我创建了一些 PHP 脚本,调用它来打印。但是,不幸的是我有一个小问题..
您可以在照片中看到问题:
当第一个 TD 中的文本在最后一页并且第二个和第三个 TD 中的图片在新页面时,我需要保护这个分页符。
我尝试使用
page-break-inside: 避免 !important;
比
空白:nowrap;
...但没有帮助
这是我的表格 CSS。
table.prvni {
margin: 100px 10px 0px 10px;
padding-bottom: 50px;
page-break-inside: avoid !important;
}
caption {
text-align: left;
font-weight: 600;
font-size: 13px;
padding-bottom: 15px;
}
th:first-child {
width: 250px;
padding: 3px 6px;
}
th:last-child {
width: 200px;
padding: 3px 3px;
}
th {
width: 200px;
padding: 3px 6px;
}
tr:first-child {
background: #ecefef;
font-size: 13px;
font-weight: 600;
}
tr {
background: #f7fafa;
font-size: 11px;
font-weight: 400;
}
td:first-child {
text-align: justify;
font-size: 12px;
font-weight: 400;
font-style: normal;
}
td:last-child {
font-style: normal;
font-weight: 400;
font-size: 12px;
}
td {
font-style: italic;
font-size: 12px;
text-align: center;
}
有人可以帮忙吗?
【问题讨论】:
标签: php css row css-tables page-break