gpt4 book ai didi

html - 表格行现在在边界内

转载 作者:太空宇宙 更新时间:2023-11-04 14:05:12 24 4
gpt4 key购买 nike

我有一个包含一些行跨度和列跨度的表格。在这里,当我应用 css 时,最后一列超出了边界。

我的HTML代码是

<table class="frame_PD-all">
<colgroup>
<col class="colnum-1 colname-col1 colwidth-4"></col><col class="colnum-2 colname-col2 colwidth-4"></col><col class="colnum-3 colname-col3 colwidth-7"></col><col class="colnum-4 colname-col4 colwidth-4"></col><col class="colnum-5 colname-col5 colwidth-7"></col><col class="colnum-6 colname-col6 colwidth-10"></col><col class="colnum-7 colname-col7 colwidth-6"></col><col class="colnum-8 colname-col8 colwidth-6"></col><col class="colnum-9 colname-col9 colwidth-6"></col><col class="colnum-10 colname-col10 colwidth-6"></col><col class="colnum-11 colname-col11 colwidth-6"></col><col class="colnum-12 colname-col12 colwidth-6"></col><col class="colnum-13 colname-col13 colwidth-6"></col><col class="colnum-14 colname-col14 colwidth-6"></col><col class="colnum-15 colname-col15 colwidth-6"></col><col class="colnum-16 colname-col16 colwidth-10"></col></colgroup>
<thead>
<tr>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">BIL</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">NO. KES</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">NAMA PEMBELI</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">NO. K/P</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">ALAMAT PEMBELI</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">TARIKH LELONGAN</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">TARIKH LUPUT</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">HARGA RIZAB</span>
</div>
</td>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">HARGA JUALAN</span>
</div>
</td>
<th class="align-center" valign="top" colspan="3">
<div class="para">
<span class="font-style-bold">DEPOSIT 10% HARGA RIZAB</span>
</div>
</th>
<th class="align-center" valign="top" colspan="3">
<div class="para">
<span class="font-style-bold">BAKI HARGA BELIAN</span>
</div>
</th>
<td class="align-center" rowspan="2" valign="top">
<div class="para">
<span class="font-style-bold">TARIKH PENERIMAAN PENYATA AKAUN (S.268(A)) KTN</span>
</div>
</td>
</tr>


<tr>
<th class="align-center" valign="top">
<div class="para">
<span class="font-style-bold">TARIKH</span>
</div>
</th>
<th class="align-center" valign="top">
<div class="para">
<span class="font-style-bold">NO RESIT</span>
</div>
</th>
<th class="align-center" valign="top">
<div class="para">
<span class="font-style-bold">JUMLAH</span>
</div>
</th>
<th class="align-center" valign="top">
<div class="para">
<span class="font-style-bold">TARIKH</span>
</div>
</th>
<th class="align-center" valign="top">
<div class="para">
<span class="font-style-bold">NO RESIT</span>
</div>
</th>
<th class="align-center" valign="top">
<div class="para">
<span class="font-style-bold">JUMLAH</span>
</div>
</th>
</tr>
</thead>
<tbody>
<tr>
<td class="align-left" valign="top">
<div class="para">
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
<td class="align-left" valign="top">
<div class="para"></div>
</td>
</tr>
</tbody>
</table>

应用的css可以在这个fiddle中找到,请让我知道我哪里出错了。在 fiddle 中扩展 html 窗口时,您可以看到最后一列。

我缺少边框,在屏幕截图中突出显示,最后一列被踢出表格。 enter image description here

谢谢

最佳答案

像这样

demo

html

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td rowspan="2" align="center"><span class="font-style-bold">BIL</span></td>
<td rowspan="2" align="center"><span class="font-style-bold">KES</span></td>
<td rowspan="2" align="center"><span class="font-style-bold">NAMA PEMBELI</span></td>
<td rowspan="2" align="center"><span class="font-style-bold">NO. K/P</span></td>
<td rowspan="2" align="center"><span class="para"><span class="font-style-bold">ALAMAT PEMBELI</span> </span></td>
<td rowspan="2" align="center"><span class="para"><span class="font-style-bold">TARIKH LELONGAN</span> </span></td>
<td rowspan="2" align="center"><span class="font-style-bold">TARIKH LUPUT</span></td>
<td colspan="3" align="center"><span class="font-style-bold">DEPOSIT 10% HARGA RIZAB</span></td>
<td colspan="3" align="center"><span class="para"><span class="font-style-bold">BAKI HARGA BELIAN</span></span></td>
<td rowspan="2" align="center"><span class="font-style-bold">TARIKH PENERIMAAN PENYATA AKAUN (S.268(A)) KTN</span></td>
</tr>
<tr>
<td align="center"><span class="font-style-bold">TARIKH</span></td>
<td align="center"><span class="para"><span class="font-style-bold">NO RESIT</span></span></td>
<td align="center"><span class="font-style-bold">JUMLAH</span></td>
<td align="center"><span class="font-style-bold">TARIKH</span></td>
<td align="center"><span class="font-style-bold">NO RESIT</span></td>
<td align="center"><span class="font-style-bold">JUMLAH</span></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
</table>

关于html - 表格行现在在边界内,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21185473/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com