在我的一生中,我无法摆脱 Logo 与其下方其他图像之间的填充。我已经圈出了间距。图像应该相互齐平。没有空白。我错过了什么?
我的代码:
table {
border-spacing: 0px;
}
tr {
padding: 0px;
}
td {
padding: 0px;
}
td.purpSpacerAlign {
vertical-align: bottom;
}
img {
vertical-align: top;
}
<table>
<tr>
<td colspan="9">
<img src="images/logo_lt.gif"></td>
<td colspan="3">
<img src="images/logo_rt.gif"></td>
</tr>
<tr>
<td>
<img src="images/purple_line_lt.gif" width="23" height="27"></td>
<td>
<img src="images/nav_grad_home.gif"></td>
<td>
<img src="images/spacer.gif" width="32"></td>
<td>
<img src="images/spacer.gif" width="32"></td>
<td>
<img src="images/spacer.gif" width="32"></td>
<td>
<img src="images/spacer.gif" width="32"></td>
<td>
<img src="images/spacer.gif" width="32"></td>
<td>
<img src="images/spacer.gif" width="5"></td>
<td>
<img src="images/spacer.gif" width="20"></td>
<td>
<img src="images/logo_crafts.gif"></td>
<td>
<img src="images/top_grad_line.gif"></td>
<td class="purpSpacerAlign">
<img src="images/spacer_purple.gif"></td>
</tr>
</table>
最佳答案
在没有任何背景的情况下,这个问题很难回答。我假设这是一个 HTML 表格?虽然这只是一种解决方法,(没有看到您的代码),
尝试将此添加到您的 html 中以查看是否有帮助:
<style>
* { margin: 0; border: 0; padding: 0}
</style>
关于html - 删除表格图像之间的填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45383805/