2015-09-16 49 views
0

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

我已经删除“PX”的所有实例,应用width="599"<table><tr><td>我能找到,并在需要时已删除所有div赞成跨度。

我意识到重复的width="599"是多余的,可能是不必要的,但我现在处于绝望的境地。其他问题是相似的,我尝试了他们的解决方案,但对我来说还没有运气。我的代码如下,如果有人愿意通过它:

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

任何帮助非常感谢!

+0

如果MS-Outlook的最重要的细节之一显而易见的是它是有意设计的,是否真的值得投入那么多时间来尝试使MS-Outlook中的显示与其他电子邮件客户端提供的类似与标准不符? _为什么?_对于不符合标准的客户编写代码是毫无意义的。您正在投资和支付MS的任务。别。 – arkascha

回答

0

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

即使电子邮件模板是响应式的,您也应该考虑保持尽可能多的内联样式。

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

style="width:600;" 

活动监视器有一些很好的指导,以编码和电子邮件中的CSS。

This is a good starting point

+0

我认为这是诀窍,感谢Henkealg! – drewhagni

+0

很好,你解决了它。请将答案标记为已接受以结束该问题。 – Henkealg

相关问题