我一直在使用html電子郵件模板。而且我幾乎在我的工作結束。這個模板在市長電子郵件客戶端中看起來很不錯。但是Outlook 2007/2010/2013存在問題。這三個人不尊重我的模板的最大寬度。我不知道爲什麼會發生這種情況。屬性「寬度」<table>標記在Outlook中無法正常工作
你有什麼想法嗎?
任何意見將不勝感激。謝謝。
<body style="margin:0; font-size:13px; font-family:'Trebuchet MS', Helvetica, Verdana, Arial;" bgcolor="#bb9dd8">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td bgcolor="#bb9dd8">
<!-- //Begin Main Container\\ -->
<table class="mainContainer" style="margin-top:20px;" width="640px" align="center" cellspacing="0" cellpadding="0" border="0">
<!-- //From here begin header and the layout structure\\ -->
那是定義最大寬度的代碼片段。謝謝。
什麼問題?它是否低於100%或更多?如果更多,請使用table-layout:fixed;爲了凍結你的表格的寬度 –
謝謝你。這個想法是什麼?要將表固定爲特定大小?無論如何,如果問Outlook的問題。是模板需要超過640px,這是最大的寬度。 – Allen
這個想法是,與你的完整代碼一樣,我指向這個http://www.w3.org/wiki/CSS/Properties/table-layout。除此之外,對於outlook,你可以嘗試使用width:expression(...)這些舊的IE(<8)理解並用於模擬CSS中的所有計算或條件(js內部)。看到這個http://www.websitecodetutorials.com/code/ie/ie6-min-max-height-width.php或任何其他鏈接,你可以找到與「IE CSS EXPRESSION」像http://mark-story.com/ posts/view/css-expressions-in-ie-and-scoping from https://www.google.fr/search?q=ie+css+expression –