<table border="0px" cellpadding="0" cellspacing="0" width="700" height="50" style="margin:0px 0px 0px 0px;text-align:center;" >
<tr>
<td>
<p style="background-color:#dedede;line-height:25px;font-family: verdana,sans-serif;font-size:9px;">For more information on delegate registration and sponsorship opportunities</p>
<img style="margin-top:0;" width="700" height="9" src="http://i61.tinypic.com/28cfx3m.jpg" alt="bottombanner"/>
</td>
</tr>
</table>
这是 js fiddle .
在上面的代码中,<p>
之间有一个空格& <img>
标签,当它转换成常用格式/电子邮件格式时。如何在不给出负值的情况下删除该空白。
提前致谢。
最佳答案
尝试在 img 样式中添加 vertical-align
<img style="margin-top:0; vertical-align:top;" width="700" height="9" src="http://i61.tinypic.com/28cfx3m.jpg" alt="bottombanner"/>
这是 jsfiddle - http://jsfiddle.net/GWAkp/3/
编辑代码:--- 查看编辑的 p 样式
<table cellpadding="0" cellspacing="0" width="700" height="50" style="margin:0px 0px 0px 0px;text-align:center;" >
<tr>
<td>
<p style="background-color:#dedede;line-height:25px;font-family: verdana,sans-serif;font-size:9px;margin-bottom:0px; padding-bottom:0px;">For more information on delegate registration and sponsorship opportunities</p>
<img style="margin-top:0px; vertical-align:top;" width="700" height="9" src="http://i61.tinypic.com/28cfx3m.jpg" alt="bottombanner"/>
</td>
</tr>
</table>
JS fiddle - http://jsfiddle.net/GWAkp/6/
关于html - 转换成oft格式时如何去除两个img之间的空白?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24623948/