我不知道爲什麼,但我似乎無法在我的腳本中設計td元素。我試圖從表格字幕中刪除所有td元素的邊框,並且我猜我的css在某種程度上是錯誤的。不能設計td元素
PS:我只能通過內聯CSS刪除邊框。
HTML:
<table>
<thead>
<tr>
<th width="100%" colspan="5">My Recent Activity</th>
</tr>
</thead>
<tbody>
<tr class="table-subtitles">
<td style="border: 0"><h4>Date</h4></td>
<td><h4>Description</h4></td>
<td><h4>Amount</h4></td>
<td><h4>Due</h4></td>
<td><h4>Status</h4></td>
</tr>
<?php foreach($this->payments as $payment): ?>
<tr>
</tr>
<?php endforeach; ?>
<?php
if ((count($this->payments)==0)) :
?>
<tr>
<td style="border: 0; text-align: center" colspan="6" class="info">No payments made yet</td>
</tr>
<?php endif; ?>
</tbody>
</table>
CSS:
#payments-content { width: 480px; float: left; margin-right: 20px; }
#payments-sidebar { width: 270px; float: left; }
.ui-button-large .ui-button-large-text { font-size: 20px; width: 270px; }
// new tables design
.table-subtitles td{ border-bottom: 0 !important; }
嘗試使用螢火蟲或鉻檢查器查看td上的樣式級聯。它可能被替換爲更優先的其他規則 – Einacio
您能提供一個完整的,自給自足的代碼示例,可以在jsfiddle.net中進行測試嗎? – mellamokb
我剛發佈了完整的css文件 – aporat