Html 表单元格之间的空间
因为那件事我完全疯了。我尽了我所能,但没有任何效果 范例 CSSHtml 表单元格之间的空间,html,css,html-table,Html,Css,Html Table,因为那件事我完全疯了。我尽了我所能,但没有任何效果 范例 CSS body { margin-top:0; margin-bottom:0; margin-left:0; margin-right:0; } table.gh { margin:0px auto 0px auto; background-color:#00ffff; width:700px; border-collapse:collapse; padding:0px 0px 0
body
{
margin-top:0;
margin-bottom:0;
margin-left:0;
margin-right:0;
}
table.gh
{
margin:0px auto 0px auto;
background-color:#00ffff;
width:700px;
border-collapse:collapse;
padding:0px 0px 0px 0px;
border-spacing:0px 0px;
text-align:center;
vertical-align:top;
}
table.gg
{
margin:0px auto 0px auto;
background-color:#00ffff;
width:700px;
border-collapse:collapse;
padding:0px 0px 0px 0px;
border-spacing:0px 0px;
text-align:center;
vertical-align:top;
}
和HTML体内:
<table class="gh">
<tr>
<td>
<table class="gg">
<tr>
<td><img src="http://www.astrofotos.info/var/resizes/casb/Eclipse-Austr%C3%A1lia-2012/IMG_5631.jpg?m=1352856326" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
现在。。。你看到图片和页面顶部之间有一点空间了吗?我怎样才能摆脱它 表格单元格的填充导致了您的问题 添加这段小代码,它将起作用:
table.gh td {
padding: 0;
}
天啊!我真不敢相信,伙计。。。你真了不起D大个子男人!非常感谢!