本文介绍了两个td或tr标签之间的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要帮助我解决一些真的,真的很麻烦我。
我有这个css和html代码:
I would like u to help me to solve something that's really, really bother me a lot.i've got this css and html code:
body
{
background-color:#ffffff;
margin-top:0;
margin-bottom:0;
margin-left:0;
margin-right:0;
padding-top:0px;
}
table.main-table-default
{
margin:0px auto 0px auto;
background-color:#00ffff;
width:700px;
border-collapse:collapse;
padding:0px;
border-spacing:0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-default td
{
border-collapse:collapse;
padding:0px 0px 0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-header-default
{
margin:0px auto 0px auto;
background-color:#000000;
width:700px;
border-collapse:collapse;
padding:0px 0px 0px 0px;
border-spacing:0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-header-default td
{
border-collapse:collapse;
padding:0px 0px 0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-header-default tr
{
border-collapse:collapse;
padding:0px 0px 0px 0px;
text-align:center;
vertical-align:top;
}
和HTML:
<table class="main-table-default">
<tr>
<td>
<table class="main-table-header-default">
<tr>
<td><img src="http://i1.ytimg.com/vi/OguOU5cyikI/hqdefault.jpg" border="0">
</td>
</tr>
<tr>
<td><img src="http://i1.ytimg.com/vi/OguOU5cyikI/hqdefault.jpg" border="0">
</td>
</tr>
</table>
</td>
</tr>
</table>
图片之间有一些空间,我想摆脱ot,怎么可能呢?
谢谢!
There's some space between images, i wanna get rid of ot, how is it possible to do that?Thanks!
推荐答案
修改的CSS:
body
{
background-color:#ffffff;
margin-top:0;
margin-bottom:0;
margin-left:0;
margin-right:0;
padding-top:0px;
}
table.main-table-default
{
margin:0px auto 0px auto;
background-color:#00ffff;
width:700px;
border-collapse:collapse;
padding:0px;
border-spacing:0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-default td
{
border-collapse:collapse;
padding:0px 0px 0px 0px;
text-align:center;
vertical-align:top;
line-height:0;
}
table.main-table-header-default
{
margin:0px auto 0px auto;
background-color:#000000;
width:700px;
border-collapse:collapse;
padding:0px 0px 0px 0px;
border-spacing:0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-header-default td
{
border-collapse:collapse;
padding:0px 0px 0px 0px;
text-align:center;
vertical-align:top;
}
table.main-table-header-default tr
{
border-collapse:collapse;
padding:0px 0px 0px 0px;
text-align:center;
vertical-align:top;
}
您可以在此jsfiddle中查看:
这篇关于两个td或tr标签之间的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!