2015-09-16 53 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

相關問題