-1
沒有標題,我的表看起來很好,很正常。我嘗試添加一個表格標題,並將所有內容都排除在外。有誰能告訴我如何避免這種情況?爲什麼我的表格標題將表格行推得不合適?
相關代碼:
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="white">
<th width="80%"> Let's talk about the wall </th>
<tr>
<td width="6%" align="center" bgcolor="white"><font face="arial"><strong></strong></font></td>
<td width="75%" align="center" bgcolor="white"><font face="arial"><strong></strong></font></td>
<td width="19%" align="center" bgcolor="white"><font face="arial"><strong></strong></font></td>
</tr>
然後:
<tr>
<td bgcolor="white"><font face="arial"></font></td>
<td bgcolor="white"><a href="view_topic.php?id=<? echo $rows['id']; ?>"><font face="arial"><? echo $rows['topic']; ?></a><BR></font></td>
<td align="center" bgcolor="white"><font face="arial"></font></td>
</tr>
需要明確的是,你看到的文字,如 '測試', 'slaaa' 等 - 我希望它能夠更接近它所在位置的左邊,這就是我沒有標題的表格時所處的位置。
你的標題爲一個單元,但在你的表的其餘部分,每排有三個單元。如果您希望標題覆蓋全部三列,請查看colspan屬性。 – j08691