gpt4 book ai didi

html - 如何删除表格底部的空白区域?

转载 作者:行者123 更新时间:2023-11-28 00:27:27 24 4
gpt4 key购买 nike

我想弄清楚为什么我的 table 底部有空位?我怎样才能删除那个空间?

enter image description here

代码如下:

<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#CDD2FF">
<tr>
<td style="vertical-align:bottom">

<ul>
<li>
<a href="x.php">Item</a>
</li>
<li>
<a href="x.php">Item</a>
</li>
<li>
<a href="x.php">Item</a>
</li>
</ul>

</td>
</tr>
</table>

最佳答案

空间,即因为为 UL 元素分配的默认边距。尝试将 margin-bottom 设置为 0;即:

<table width="100%" cellspacing="0" cellpadding="0" bgcolor="#CDD2FF">
<tr>
<td style="vertical-align:bottom">
<ul style="margin-bottom: 0">
<li><a href="x.php">Item</a></li>

<li><a href="x.php">Item</a></li>

<li><a href="x.php">Item</a></li>
</ul>
</td>
</tr>
</table>

关于html - 如何删除表格底部的空白区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4788339/

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