我的问题是,我有两个不同的html文件,包含一个包含headader,tfooter和tbody的表格。打印预览在每个页面上重复tfoot
第一个是我自己创作测试的原因,它看起来像这样:
<html>
<head>
<title>The Invoice</title>
<style type="text/css">
table.invoice { background-color: #dddddd; font-family: sans-serif; }
td, th { background-color: #ffffff; padding: 5pt; }
td.unit { text-align: right; }
td.price { text-align: right; }
thead { display: table-header-group; }
tfoot th { text-align: right; }
</style>
</head>
<body>
<div style="width:auto !important; overflow:hidden; position:relative">
<table class="invoice" cellspacing="1" cellpadding="0">
<thead>
<th>Unit</th>
<th>Description</th>
<th>Price</th>
</thead>
<tfoot>
<tr>
<th colspan="2">Sum</th>
<td class="price">1.230,32 EUR</td>
</tr>
</tfoot>
<tbody>
<tr><td>1</td><td>Excel</td><td >150,00 EUR</td></tr>
<tr><td>2</td><td>Document</td><td>150,00 EUR</td></tr>
... and so on ...
</tbody>
</table>
</div>
</body>
</html>
每当我试图在IE9打印预览它显示在最后一页上TFOOT(第5页在我的情况)其中显示了主体内容价格列的总体总和。 当我在Mozilla Firefox 11.0中尝试使用相同的功能时,它显示了当前不想要的每个页面上总体总和的tfoot。
我问的主要原因是因为我有一个FreeAgent html dom,我想打印出一些发票。有了这个html文件,即使IE9在每一页上都显示了tfoot,这又是!我不想要。
我
@media print { tfoot { display: table-footer-group;
position: absolute;
bottom: 0; }}
有它显示的页脚只有一次发挥各地,但在左下的第一页上的所有进行的跨我的文字休息...
想法或解决方案相比,不胜感激! :)