私の問題は、theader、tfooter、およびtbodyを含むテーブルを持つ2つの異なるhtmlファイルがあることです。印刷プレビューは各ページのtfootを繰り返す
最初の1は、テストの理由から、私自身の創造であり、それは次のようになります。
<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を表示しますが、もう一度!、私は望みません。
私は...ずっと
アイデアやソリューションを、それが一度だけフッターを示しているが、下部の最初のページにすべてを残したが、私のテキストの残りの部分をaccross
が@media print { tfoot { display: table-footer-group;
position: absolute;
bottom: 0; }}
で遊ん感謝! :)