2013-01-24 15 views
0

我正在測試一個html電子郵件是... Outlook,它在我的表格右側添加了一個奇怪的不需要的邊距。Outlook正在添加一個右邊距我不想要

這兩個表格應該並排排列,每個400px父表格(在手機上摺疊爲200px)每個200px。

Outlook的行爲的第一條線索是表格不再是並排的。當選定文本添加的利潤率清楚地顯示出:

enter image description here

在所有的任何想法?這是我的代碼 - 正如你所看到的,我已經嘗試了幾乎所有我能想到的東西!

<table width="400" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse; margin-right: none; witdh: 200px"> 
    <tr style="border-collapse:collapse; margin-right: none; witdh: 400px"> 
    <td style="border-collapse:collapse; margin-right: none; witdh: 400px"> 

<table width="200" border="0" cellspacing="0" cellpadding="0" align="left" style="border-collapse:collapse; margin-right: none; witdh: 200px;"> 
    <tr style="border-collapse:collapse; margin-right: none; witdh: 200px"> 
    <td style="border-collapse:collapse; margin-right: none; witdh: 200px">Box;</td> 
    </tr> 
</table><table width="200" border="0" cellspacing="0" cellpadding="0" align="left" style="border-collapse:collapse; margin-right: none; witdh: 200px;"> 
    <tr style="border-collapse:collapse; margin-right: none; witdh: 200px"> 
    <td style="border-collapse:collapse; margin-right: none; witdh: 200px">Box;</td> 
    </tr> 
</table> 

    </td> 
    </tr> 
</table> 

回答

0

找到解決方案!我遇到了同樣的問題 - 我正在跟隨Campaign Monitor的響應式佈局提示,他們確實推薦使用表格。另外,根據我的經驗,我不能讓<td>的行爲像iOS Mail上的行一樣(適用於Mobile Safari,但在您通過電子郵件發送時不再有效)。

一些更多的谷歌搜索和我來解決方案:it involves setting borders and wrapping the content of the <td> on a <p>tag。檢查步驟3.​​它的工作原理!

2

這不是Outlook在Outlook中的工作方式,我很抱歉!

你需要在一個表中的所有數據,或者換一個「超級表」在你的兩個表

<table id="supertable"> 
    <tr> 
    <td width="200"> 
     <!-- Left-hand table goes here --> 
     <table> 
     <tr> 
      <td>Box;</td> 
     </tr> 
     <tr> 
      <td>Box;</td> 
     </tr> 
     </table> 
    </td> 
    <td width="200"> 
     <!-- Right-hand table goes here --> 
     <table> 
     <tr> 
      <td>Unsubscribe here...</td> 
     </tr> 
     <tr> 
      <td>Change your details here...</td> 
     </tr> 
     </table> 
    </td> 
    </tr> 

當涉及到Outlook HTML(即回合制的本世紀初的表 - 基礎怪物)最好在方格紙上畫出你的設計來制定你的「網格」。然後,您可以使用<td>/<tr>元素的colspanrowspan屬性來合理地佈置事物。

+0

該代碼仍然存在邊距(或其他)。 我正在尋找的是兩個並排的單元格表格。他們需要成爲表格而不是單元格,以便在響應式手機模板中可以滑入單個列。 –

+0

我聽到你的聲音,但你必須記住Outlook的HTML解析器是IE 5.5的混蛋。如果你想讓移動設備變得更加靈活,你將不得不做更復雜的事情。 查看http://htmlemailboilerplate.com/瞭解更多信息(以及任何HTML電子郵件佈局的絕佳起點!)。 –

相關問題