Ale*_*nik 4 html css html-table
我有一个简单的表格,可以在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>
Run Code Online (Sandbox Code Playgroud)
问题是,如果我尝试使用以下代码向表格添加页脚:
<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>
Run Code Online (Sandbox Code Playgroud)
它破坏了表格,那么我到底该如何将页脚添加到表格中呢?
使用 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>
Run Code Online (Sandbox Code Playgroud)