我有一个html sig,我想从outlook发送。它渲染得很好,但问题是 hotmail 以不同的方式显示它。
它添加了带填充的额外p标签。名为ecxMsoNormal
的课程
以下是我想从MS Outlook 2010发送到hotamil.com的HTML。它在大多数客户端都很好,但在hotmail.com中却不是很好。
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
<!--
p.MsoNormal {
margin: 0px !important;
text-decoration: none !important;
}
p.ecxMsoNormal {
margin: 0px !important;
}
td {
padding: 0px !important;
}
a {
text-decoration: none !important;
}
-->
</style>
</head>
<body>
<table style="mso-table-lspace: 0; mso-table-rspace: 0; min-width: 400px;max-width:525px">
<tr>
<td>
<table width="100%" style="mso-table-lspace: 0; mso-table-rspace: 0;">
<td>
<table style="mso-table-lspace: 0; mso-table-rspace: 0;">
<tr>
<td valign="bottom" nowrap style=" line-height:1px; border-top: 1pt solid black; "> </td>
</tr>
<tr>
<td valign="bottom" nowrap style=" "><SPAN
STYLE="color: #005a83; font-size: 11pt; font-family: arial; margin: 0; padding: 0;">Shamraiz Akhtar</SPAN></td>
</tr>
<tr>
<td valign="bottom" align="left" style="mso-line-height-rule:exactly; line-height:23px; height:23px;" nowrap><SPAN
STYLE="color: #92d050; font-size: 10pt; font-family: arial; margin: 0; padding: 0; vertical-align: bottom ; ">Technical Support Engineer</SPAN></td>
</tr>
</table>
</td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td valign="bottom">
<table width = "100%"><tr>
<td valign="bottom" ><img width="168.2" height="46.5" align="right" src="https://www.spectrumgeo.com/wp-content/uploads/Spectrum_logo_email-171w.jpg" nosend="1" /></td>
</tr></table></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table style=" width: 100%; line-height:23px; height:53px;" >
<tr>
<td align="left" nowrap><SPAN STYLE="color: #92d050; font-size: 9pt; font-family: arial; margin: 0; padding: 0;"> t:</SPAN>
<span
STYLE="color: #005a83; font-size: 9pt; font-family: arial; margin: 0; padding: 0;">+44 1483 730201</span></td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td align="center" style='padding-left: 10px;' nowrap><SPAN STYLE="font-size: 14pt; margin: 0; padding: 0;">| </SPAN></td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td align="center" style='padding: 0in 0in 0in 0in' nowrap><SPAN STYLE="color: #92d050; font-size: 9pt; font-family: arial; margin: 0; padding: 0;">f:</SPAN>
<span STYLE="color: #005a83; font-size: 9pt; font-family: arial; margin: 0; padding: 0;">+44 1483 762620</span></td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td align="center" style='padding-left: 10px;' ><SPAN STYLE="font-size: 14pt; margin: 0; padding: 0;">| </SPAN></td>
<td></td>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td align="right" style='padding: 0in 0in 0in 0in' nowrap><SPAN STYLE="color: #92d050; font-size: 9pt; font-family: arial; margin: 0; padding: 0;">w:</SPAN>
<span STYLE="color: #005a83; font-size: 9pt; font-family: arial; margin: 0; padding: 0;">
<a STYLE="color: #005a83; text-decoration: none !important;" href="www.spectrumgeo.com">spectrumgeo.com</a></span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table style="mso-table-lspace: 0; mso-table-rspace: 0; line-height:23px; height:53px;">
<tr>
<td colspan="9" style='padding: 0in 0in 0in 0in'><SPAN
STYLE="color: #005a83; font-size: 8pt; font-family: arial;"> Dukes
Court, Dukes Street, Woking, Surrey, GU21 5BH, UK</span></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<table style="mso-table-lspace: 0; mso-table-rspace: 0;">
<tr>
<td><SPAN STYLE="color: #005a83; font-size: 8pt; font-family: arial; text-decoration: none !important;"> follow us on
<span style="text-decoration: none !important;">•
<a style="color: #00b0ed; text-decoration: none !important;" href="https://twitter.com/SpectrumASA">twitter
</span></a>•
<a style="color: #3b5998; text-decoration: none !important;" href="https://www.facebook.com/spectrum.geo"> facebook
</a> • <a style="color: #0077b5; text-decoration: none !important;"
href="https://www.linkedin.com/company/spectrum-asa">
linkedin</a>
</span></td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
来自hotmail.com的HTML
<style>
.ExternalClass p.ecxMsoNormal, .ExternalClass li.ecxMsoNormal, .ExternalClass div.ecxMsoNormal {
font-size:11.0pt;
font-family:"Calibri","sans-serif";
}
.ExternalClass a:link, .ExternalClass span.ecxMsoHyperlink {
color:blue;
text-decoration:underline;
}
.ExternalClass span.ecxMsoHyperlinkFollowed {
color:purple;
text-decoration:underline;
}
.ExternalClass span.ecxEmailStyle17 {
font-family:"Calibri","sans-serif";
color:windowtext;
}
.ExternalClass .ecxMsoChpDefault {
font-family:"Calibri","sans-serif";
}
.ExternalClass div.ecxWordSection1 {
}
</style>
<div class="ecxWordSection1">
<p class="ecxMsoNormal"> </p>
<p class="ecxMsoNormal"> </p>
<table class="ecxMsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<table class="ecxMsoNormalTable" style="width:100.0%;" width="100%" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<table class="ecxMsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="border:none;border-top:solid black 1.0pt;padding:0cm 0cm 0cm 0cm;" nowrap="" valign="bottom">
<p class="ecxMsoNormal" style=""><span style="font-size:12.0pt;font-family:"Times New Roman","serif";">
</span></p>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;" nowrap="" valign="bottom">
<p class="ecxMsoNormal"><span style="font-family:"Arial","sans-serif";color:#005A83;">Shamraiz Akhtar</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
</tr>
<tr style="height:17.25pt;">
<td style="padding:0cm 0cm 0cm 0cm;height:17.25pt;" nowrap="" valign="bottom">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:#92D050;">Technical Support Engineer</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
</tr>
</tbody>
</table>
</td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;" valign="bottom">
<table class="ecxMsoNormalTable" style="width:100.0%;" width="100%" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;" valign="bottom">
<p class="ecxMsoNormal"><img src="https://dub111.afx.ms/att/GetInline.aspx?messageid=dbd438e5-cd89-11e4-94d4-d89d675c89ae&attindex=0&cp=-1&attdepth=0&imgsrc=cid%3aimage001.jpg%4001D06196.9A364160&cid=8cdc5241b8bbef16&hm__login=shorif2000&hm__domain=hotmail.com&ip=10.211.24.8&d=d4389&mf=32&hm__ts=Wed%2c%2018%20Mar%202015%2016%3a14%3a46%20GMT&st=shorif2000&hm__ha=01_b23645d1fb986111e84fcc757dcb02baf2fd07545d47e67f35b5452c5bca60e4&oneredir=1" alt="https://www.spectrumgeo.com/wp-content/uploads/Spectrum_logo_email-171w.jpg" align="right" width="168" height="46"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<table class="ecxMsoNormalTable" style="width:100.0%;" width="100%" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;" nowrap="">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#92D050;"> t:</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";">
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#005A83;">+44 1483 730201</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;" nowrap="">
<p class="ecxMsoNormal" style="text-align:center;line-height:17.25pt;" align="center">
<span style="font-size:14.0pt;font-family:"Times New Roman","serif";">|
</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;" nowrap="">
<p class="ecxMsoNormal" style="text-align:center;line-height:17.25pt;" align="center">
<span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#92D050;">f:</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";">
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#005A83;">+44 1483 762620</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="text-align:center;line-height:17.25pt;" align="center">
<span style="font-size:14.0pt;font-family:"Times New Roman","serif";">|
</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;"></td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"> </span></p>
</td>
<td style="padding:0cm 0cm 0cm 0cm;" nowrap="">
<p class="ecxMsoNormal" style="text-align:right;line-height:17.25pt;" align="right"><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#92D050;">w:</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";">
</span><span style="font-size:9.0pt;font-family:"Arial","sans-serif";color:#005A83;"><a href="https://www.spectrumgeo.com" target="_blank"><span style="color:#005A83;text-decoration:none;">spectrumgeo.com</span></a></span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<table class="ecxMsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal" style="line-height:17.25pt;"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#005A83;"> Dukes Court, Dukes Street, Woking, Surrey, GU21 5BH, UK</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<table class="ecxMsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:0cm 0cm 0cm 0cm;">
<p class="ecxMsoNormal"><span style="font-size:8.0pt;font-family:"Arial","sans-serif";color:#005A83;"> follow us on •
<a href="https://twitter.com/SpectrumASA" target="_blank"><span style="color:#00B0ED;text-decoration:none;">twitter
</span></a>• <a href="https://www.facebook.com/spectrum.geo" target="_blank"><span style="color:#3B5998;text-decoration:none;">facebook
</span></a>• <a href="https://www.linkedin.com/company/spectrum-asa" target="_blank"><span style="color:#0077B5;text-decoration:none;">linkedin</span></a>
</span><span style="font-size:12.0pt;font-family:"Times New Roman","serif";"></span></p>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="ecxMsoNormal"> </p>
</div>
如果您点击此处的链接,则没有任何更新Hotmail adding p tags within email, creating unwanted spacing。链接很旧,所以如果有解决方案,因为如果有人可以分享他们的代码会很棒。
答案 0 :(得分:0)
Outlook发送<p class="MsoNormal">
代码,Outlook.com将ecx
添加到该类和其他填充内。
将.ecxMsoNormal{padding:0; margin:0;}
添加到您的style
代码。