Gmail中添加了一个缺口,在outlook的html签名中

Gmail中添加了一个缺口,在outlook的html签名中,html,outlook,gmail,signature,Html,Outlook,Gmail,Signature,我已经创建了一个html签名,需要在Outlook中使用。根据建议,我使用了表格布局,给出了所有图像,甚至td、tr和表格本身的特定高度和宽度,0填充和边距,甚至尝试在实际标记上以css和旧方式添加这些内容。 在outlook中,它是正确的,但在gmail中,它增加了tr之间的差距。 按照这里的建议:,我尝试将style=“display:block;”添加到图像中,但仍然没有成功。 以下是我使用的代码: <table cellspacing="0px" cellpadding="0px"

我已经创建了一个html签名,需要在Outlook中使用。根据建议,我使用了表格布局,给出了所有图像,甚至td、tr和表格本身的特定高度和宽度,0填充和边距,甚至尝试在实际标记上以css和旧方式添加这些内容。
在outlook中,它是正确的,但在gmail中,它增加了tr之间的差距。 按照这里的建议:,我尝试将style=“display:block;”添加到图像中,但仍然没有成功。 以下是我使用的代码:

<table cellspacing="0px" cellpadding="0px" border="0px" width="592px" height="254px" style="border-collapse:collapse; border:none; padding:0px; margin:0px; width:592px; height:254px;">
<tr cellspacing="0px" cellpadding="0px" width="592px" height="90px" style="padding:0px; margin:0px; width:592px; height:90px;">
<td cellspacing="0px" cellpadding="0px" width="83px" height="90px" style="padding:0px; margin:0px; width:83px; height:90px;">&nbsp;</td>
<td cellspacing="0px" cellpadding="0px" width="150px" height="90px" style="padding:0px; margin:0px; width:150px; height:90px;"><img src="new_sig.files/sig2.png" width="150px" height="90px"></td>
<td cellspacing="0px" cellpadding="0px" width="359px" height="90px" style="padding:0px; margin:0px; width:359px; height:90px;"><img src="new_sig.files/sig3.png" width="359px" height="90px"></td>
</tr>
<tr cellspacing="0px" cellpadding="0px" width="592px" height="64px" style="padding:0px; margin:0px; width:592px; height:64px;">
<td cellspacing="0px" cellpadding="0px" width="83px" height="64px" style="padding:0px; margin:0px; width:83px; height:64px;"><a href="http://www.facebook.com"><img style="border:none;" src="new_sig.files/sig4.png" width="83px" height="64px"></a></td>
<td cellspacing="0px" cellpadding="0px" width="150px" height="64px" style="padding:0px; margin:0px; width:150px; height:64px;"><img src="new_sig.files/sig5.png" width="150px" height="64px"></td>
<td cellspacing="0px" cellpadding="0px" width="359px" height="64px" style="padding:0px; margin:0px; width:359px; height:64px;"><img src="new_sig.files/sig6.png" width="359px" height="64px"></td>
</tr>
<tr cellspacing="0px" cellpadding="0px" width="592px" height="100px" style="padding:0px; margin:0px; width:592px; height:100px;">
<td cellspacing="0px" cellpadding="0px" width="83px" height="100px" style="padding:0px; margin:0px; width:83px; height:100px;"><img src="new_sig.files/sig7.png" width="83px" height="100px"></td>
<td cellspacing="0px" cellpadding="0px" width="150px" height="100px" style="padding:0px; margin:0px; width:150px; height:100px;"><img src="new_sig.files/sig8.png" width="150px" height="100px"></td>
<td cellspacing="0px" style="padding:0px 5px 0px 15px; margin:0px; width:339px; height:100px;line-height:16px; font-size:12px;color:#4f4f4f;font-family:arial;" >
Name LastName<br/>
Description<br/><br/>
<a href="http://www.site.com" style="color:#0875a4;">www.site.com</a>
<img src="new_sig.files/phone_icon.png" width="18px" height="28px"/>
972-(0)3-6960556
<img src="new_sig.files/mail_icon.png" width="18px" height="28px"/>
<a href="mailto:name@site.com" style="color:#0875a4;">name@site.com</a>
</td>
</tr>
</table>

Name LastName
说明

972-(0)3-6960556
现在,gmail读取的代码显然是这样的:

<table width="592" cellspacing="0" cellpadding="0" border="0" style="width: 444pt; border-collapse: collapse;">
<tbody>
<tr style="min-height: 67.5pt;">
<td width="83" style="width: 62.25pt; padding: 0in; min-height: 67.5pt;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">&nbsp;</span></p>
</td>
<td width="150" style="width: 112.5pt; padding: 0in; min-height: 67.5pt;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
<img height="90" width="150" src=""></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td>
<td width="359" style="width: 269.25pt; padding: 0in; min-height: 67.5pt;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
<img height="90" width="359" src=""></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td></tr>
<tr style="min-height: 48pt;">
<td width="83" style="width: 62.25pt; padding: 0in; min-height: 48pt;">
<p class="MsoNormal"><a target="_blank" href="http://www.facebook.com/"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;; color: blue; text-decoration: none;">
<img height="64" width="83" border="0" src=""></span></a><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td><td width="150" style="width: 112.5pt; padding: 0in; min-height: 48pt;"><p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
<img height="64" width="150" border="0" src=""></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td>
<td width="359" style="width: 269.25pt; padding: 0in; min-height: 48pt;"><p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
<img height="64" width="359" border="0" src=""></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td></tr>
<tr style="min-height: 75pt;">
<td width="83" style="width: 62.25pt; padding: 0in; min-height: 75pt;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
<img height="100" width="83" border="0" src=""></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td>
<td width="150" style="width: 112.5pt; padding: 0in; min-height: 75pt;">
<p class="MsoNormal"><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;">
<img height="100" width="150" border="0" src=""></span><span style="font-size: 12pt; font-family: &quot;Times New Roman&quot;,&quot;serif&quot;;"></span></p></td>
<td width="339" style="width: 254.25pt; padding: 0in 3.75pt 0in 11.25pt; min-height: 75pt;">
<p style="line-height: 12pt;" class="MsoNormal"><span style="font-size: 9pt; color: rgb(79, 79, 79);">Name LastName<br>Description<br><br><a target="_blank" href="http://www.site.com">
<span style="color: rgb(8, 117, 164);">www.site.com</span></a> </span>
<span style="font-size: 9pt; color: rgb(79, 79, 79);">
<img height="28" width="18" border="0" src=""></span>
<span style="font-size: 9pt; color: rgb(79, 79, 79);">972-(0)3-6960556 </span>
<span style="font-size: 9pt; color: rgb(79, 79, 79);">
<img height="28" width="18" border="0" src=""></span>
<span style="font-size: 9pt; color: rgb(79, 79, 79);">
<a target="_blank" href="mailto:name@site.com">
<span style="color: rgb(8, 117, 164);">name@site.com</span></a> </span></p></td></tr>
</tbody></table>

Name LastName
说明

972-(0)3-6960556

我还尝试将整张桌子的线条高度设置为0,但这也不起作用。
最后一个单元格中的两张图片,顺便说一句,由于某种原因没有显示在gmail中



更新:直到现在才真正注意到这一点,收到了更多的答案。我们最终简化了一点设计/代码,过了一段时间我就不再查看这个页面了。不确定这里的任何解决方案是否有效,但我看到它们帮助了其他人。thnx无论如何:)

好吧,我无法通过向我的Gmail帐户发送电子邮件来复制问题,但我在Opera浏览器中检查HTML时确实看到了问题

尝试添加
垂直对齐:中间到有问题的
。它为歌剧表演出了绝妙的效果

当然,也就是说,没有看到图像,但是垂直对齐不应该阻止任何事情

您可能还想查看此工具:


免费版本允许您查看AOL Web、Gmail和Outlook 2003。

试着将其放在头部:

<style type="text/css">
    <!--
        p.MsoNormal {
            margin: 0px !important;
        }
    -->
</style>


它应该覆盖Gmail中不情愿出现的样式。

对于只包含图像的表格单元格,将行高设置为0

<td style="line-height:0"><img ... /></td>


(Acid上的电子邮件是一个很好的提示。)

您提到您尝试将style=“display:block”添加到图像中,但我在代码中没有看到这一点。在Gmail中,有几件事帮我解决了这些问题:

  • 将border=“0”和style=“display:block”添加到每个元素中
  • 在属性(而不是“样式”属性)中指定宽度和高度时,不包括“px”,只包括数字
因此,如果您确保所有图像均采用以下格式,则应删除这些间隙(假设它们不是由错误的高度值放置的)


对我有效的解决方案是我总结这里给出的每个解决方案

做了一些类似于:

        <td rowspan="2" style="line-height:0">
<img src="images/myimage.jpg" width="426" height="183" alt=""border="0" style="display:block;" />
</td>


它对我来说很好…

它确实解决了firebug中的问题,但当我再次通过outlook发送它时,由于某种原因,它会删除垂直对齐。我刚才尝试添加了valign的td,它也删除了…谢谢!我的救命恩人。非常感谢。@Tim,对于包含文本的表格单元格?有什么建议吗?非常感谢。
        <td rowspan="2" style="line-height:0">
<img src="images/myimage.jpg" width="426" height="183" alt=""border="0" style="display:block;" />
</td>