我有一个简单的表格可以在 THIS 上看到,如果您在当前租借下查看表格,您会看到下表:
但实际上我的内容如下:
正如您所看到的,目前表格中缺少页脚,目前我对表格有以下标记:
<table class="current-rentals-table">
<caption>
<h4>Select Toys to Return</h4>
<button class="btn-pink">return</button>
</caption>
<thead>
<tr>
<th></th>
<th colspan="2">Toy Details</th>
<th>Date Rented</th>
<th>Return Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<form action="">
<input type="checkbox" name="">
</form>
</td>
<td>
<img src="images/res/toy-cart/1.png" alt="toy image">
</td>
<td>
<p>Praesent dapibus, neque id cursus faucibus,tortor neque egestas augue, eu vulputate magna eros eu erat. </p>
</td>
<td>Nov 12, 2015</td>
<td>Dec 12, 2015</td>
</tr>
<tr>
<td>
<form action="">
<input type="checkbox" name="">
</form>
</td>
<td>
<img src="images/res/toy-cart/1.png" alt="toy image">
</td>
<td>
<p>Praesent dapibus, neque id cursus faucibus,tortor neque egestas augue, eu vulputate magna eros eu erat. </p>
</td>
<td>Nov 12, 2015</td>
<td>Dec 12, 2015</td>
</tr>
<!-- <tr>
<td>
<p>You have 0 credit left. <a href="">Increase your credit</a> to rent more toys or return toys you are currently renting.</p>
</td>
</tr> -->
</tbody>
</table>
如果我尝试使用以下代码向表中添加页脚:
<tr>
<td>
<p>You have 0 credit left. <a href="">Increase your credit</a> to rent more toys or return toys you are currently renting.</p>
</td>
</tr>
它打破了桌子,所以我该如何将页脚添加到桌面?
答案 0 :(得分:2)
使用tfoot标记:<tfoot>
...
</tbody>
<tfoot>
<tr>
<td colspan="5">
<p>You have 0 credit left. <a href="">Increase your credit</a> to rent more toys or return toys you are currently renting.</p>
</td>
</tr>
</tfoot>