html - 转换成oft格式时如何去除两个img之间的空白?

标签 html css

<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/

相关文章:

html - 防止边距将元素推出容器

javascript - 弹出图片html

javascript - 在静态网站中加载数据时增加网站加载时间

javascript - 当从 css 方法中的属性中删除引号时,jQuery 停止工作

jquery - SVG map 在区域点击时显示内容

css - 为什么我的固定div出现在IE8的内容下面?

javascript - 需要在一个html表单中多次使用一个字段

html - 对 th 的后代不应用任何换行

javascript - angular 指令突出显示 div 中的任何输入是否具有焦点

jQuery 高度函数不起作用