为什么Outlook忽略我的宽度属性?

时间:2015-09-16 19:59:04

标签: html email outlook

我看得很透彻,但似乎无法找到这个罪魁祸首。据我所知,电子邮件编码有点像1999年的网络编码,每个客户都忽略了不同的属性,但必须有一个我不知道的。其他电子邮件客户端看起来很好,但无论我做什么,Outlook似乎都将内容的宽度扩展到100%。

我已删除&#34; px&#34;的所有实例,已将<table>应用于我可以找到的每个<tr><td>width="599" ,并在需要时删除所有div以支持跨度。

我意识到重复的<html> <head> <title>Ultimate 5K Arena Challenge</title> <style type="text/css"> body { background: #333333; } a:link, a:active, a:visited, a:hover { color: #0033ff; text-decoration: underline; } h1 { font-size: 2.4rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.4rem; font-weight: 400; } h4 { font-size: .9rem; font-style: italic; } h5 { font-size: .8rem; font-style: italic; font-weight: 300; } h5 a:link, h5 a:visited, h5 a:active, h5 a:hover { color: #999999;} .orange { color: #ff5801;} .underline { text-decoration: underline} </style> </head> <body> <table width="599; text-align:center;" cellpadding="0" cellspacing="0" border="0" align="center" style="text-align:center; font-family:'Calibri', sans-serif; background:#ffffff;"> <tr width="599;"> <td width="599;"><a href="http://ultimate5k.mabeecenter.com/" target="_blank"><img src="http://mabeecenter.com/ultimate5k/storage/Eblast/Student%20Instructions/Assets/header.jpg"></a></td> </tr> <tr width="599;"> <td width="599;" style="background:#ffffff; padding:1rem; color:#222222;"> <p><em><small>Please pass this on to other students!</small></em></p> <h2>Oral Roberts University 50th Anniversary</h2> <h1>Ultimate 5K Arena Challenge</h1> <h3>Saturday, October 24, 2015 @ 8:30 AM</h3> <h4 class="orange">HPE Extra Credit Available for ORU Students!</h4> <span align="left"> <p>Students,</p> <p>If you haven't yet heard, our traditional Fun Run has partnered with the ORU 50th Anniversary Ultimate 5K Arena Challenge! This is a real community 5K race that we're encouraging all students to participate in. Just like in years past, you will be able to receive <strong class="orange">EXTRA CREDIT</strong> in participating HPE courses for completing this year's race.</p> <p>There are a few minor changes that we'd like to make you aware of: <br /><ol> <li>You may register online now at <a href="http://ultimate5k.mabeecenter.com/" target="_blank">Ultimate5K.MabeeCenter.com</a></li> <li class="orange">To receive the student discount, you must use password: <span class="underline">funrun</span></li> <li>Alternatively, you may download our student cash-only form from our <a href="http://ultimate5k.mabeecenter.com/students/" target="_blank">Students page</a> and register in person at the Mabee Center Ticket Office from September 14th to October 16th (M-F, 10 AM - 5 PM). For more registration information, please visit our <a href="http://ultimate5k.mabeecenter.com/event/" target="_blank">Event Info page</a>.</li> <li>You may also obtain our cash-only form from the Health, Leisure, and Sport Science Department at the Aerobics Center</li> <li>Just like a real community 5K, packet and T-shirt pickup will begin the week prior to the event (Oct. 17-23). Don't worry, we'll remind you via email!</li> </ol></p> <p>If you have any questions, please feel free to contact your HPE instructor or refer to <a href="http://ultimate5k.mabeecenter.com/" target="_blank">Ultimate5K.MabeeCenter.com</a></p> <p>By the way, don't forget to smile when you cross the finish line - you'll be on our Jumbo Mabee Vision Screen! Also, your race results will be available online immediately at <a href="http://ultimate5k.mabeecenter.com/" target="_blank">Ultimate5K.MabeeCenter.com</a>. We look forward to seeing you at the race!</p> <h4>Dr. Fritz Huber, Chair of Health, Leisure, and Sport Science Department</h4> </span> </td> </tr> <tr width="599;"> <td width="599;"><a href="http://ultimate5k.mabeecenter.com/" target="_blank"><img src="http://mabeecenter.com/ultimate5k/storage/Eblast/Student%20Instructions/Assets/footer.jpg"></a></td> </tr> </table> </body> </html> 是多余的,可能是不必要的,但我现在处于绝望的地步。其他问题类似,我尝试了他们的解决方案,但我还没有运气。如果有人愿意透视,我的代码如下:

public class Test {
    public static final String NAME = "EL Test";
}

非常感谢任何帮助!

1 个答案:

答案 0 :(得分:1)

大多数基于Web的电子邮件客户端和某些电子邮件应用程序会忽略整个电子邮件标题,包括样式定义,因此会破坏类定义。

您应该考虑尽可能保持内联样式,即使电子邮件模板具有响应性。

您的宽度属性中的分号是不必要的,甚至可能会破坏某些客户端中的电子邮件。尝试设置与样式属性相同的宽度,因为某些电子邮件客户端会优先考虑更多。

style="width:600;"

广告系列监控器对电子邮件中的编码和css有一些很好的指导。

This is a good starting point

相关问题