如何设置td的宽度为0 [英] How to set a td's width to 0
本文介绍了如何设置td的宽度为0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何设置td的宽度为0?我有一个td没有任何内容,但它总是有2px的宽度。
how can I set the width of an td to 0? I have a td without any content in it but it has always a width of 2px.
我的第一个怀疑是border-spacing属性,但设置为0不帮助不。
My first suspicion was the border-spacing property but setting it to 0 doesn't help neither.
<table>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
推荐答案
设置 td
padding to 0将 td
css规则添加 padding:0;
。
Set td
s padding to 0 adding padding: 0;
to your td
css rule.
这篇关于如何设置td的宽度为0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文