2016-10-15 114 views
0

我有一個簡單的表,就可以看到THIS,如果你查看當前租金在桌子底下,你會看到如下表:如何將頁腳添加到表格寬度爲100%的表格中?

enter image description here

但我其實什麼是低於:

enter image description here

正如你可以看到目前頁腳中缺少表,目前我已經在該表下面的標記:

<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> 

它打破了表,所以究竟如何去有關添加腳註表?

回答

1

使用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> 
+0

所以跨越所有列 –

+0

!嗯!這是怎麼跳過我的......謝謝! –

+1

我們都在這種情況下。很高興我能幫上忙 :) –

相關問題