2012-05-05 39 views
1

**編輯,這個問題只存在於Outlook Web App中的預覽窗格**展望2007/2010增加隨機換行/白色空間,HTML電子郵件

我剛纔想關於一切,但我似乎無法擺脫Outlook 2007/2010在其屏幕右側的預覽框中呈現的空白/換行符。當您從收件箱列表中雙擊電子郵件時,HTML會完美加載。但是,當它顯示在拆分收件箱列表/電子郵件預覽窗口中時,會生成換行符/空格。

我已經嘗試了書中的每一個技巧。 border-0,border = 0,display:block,cell-spacing/cell-padding:0,!important等等。

這就是我所抱怨的。 (我已經昏了過去一切爲了保密):

  1. 209.67.20.161/email/linebreaks.png
  2. 209.67.20.161/email/linebreaks2.png
  3. 209.67.20.161/email/linebreaks3.png

它可能是 「打印頁數限制(Microsoft Word)中」 這篇文章中提到:

www.emailonacid.com/blog/details/C13/horizo​​ntal_spacing_issues_in_outlook_2007_and_2010

但是,我不這麼認爲,因爲有一些非常接近彼此的換行符。

順便說一句,我在Photoshop中切片圖像並保存爲Web設備。

這裏是切片圖像:http://209.67.20.161/email/slices.png

成爲我的救星......

鏈接到我的HTML:http://209.67.20.161/email/email_sliced_forss.html

您可以通過使用HTML電子郵件發送到您自己的Outlook收件箱ctrlq.org/html-mail並在選擇HTML編輯器後複製並粘貼我的HTML源代碼。

+0

我從來沒有使用html電子郵件的leftmargin topmargin。你應該刪除它們,進一步我也認爲你有一個不必要的高度td,因爲該圖像有它自己的高度。您也可以刪除td高度。 – defau1t

回答

4

樣式您的HTML電子郵件就像在這個例子中,它將完美呈現在所有主要客戶端,甚至像蓮花筆記一樣的舊的。

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     <html xmlns="http://www.w3.org/1999/xhtml"> 
     <head> 
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
     <title>Untitled Document</title> 

<style media="all" type="text/css"> 
table td 
{ 
border-collapse: collapse; 
} 
</style> 
    </head> 

    <body> 
    <table width="680" border="0" cellpadding="0" cellspacing="0"> 
     <tr> 
      <td width="20" align="left" valign="top" rowspan="2" bgcolor="#FFFFFF" style="font-size: 10px; font-family: arial; line-height:170px;">&nbsp;</td> 
      <td width="300" height="170" rowspan="2" align="left" valign="top"> 
       <img src="another image" alt="" width="300" height="170" border="0"></td> 
      <td width="33" align="left" valign="top" bgcolor="#FFFFFF" style="font-size: 10px; font-family: arial; line-height:140px;">&nbsp;</td> 
      <td width="327" colspan="2" align="left" valign="top" bgcolor="#FFFFFF" style="font-size: 14px; font-family: arial; color:#5D5B5C; line-height: 16px;">some exemple text here</td> 
     </tr> 
     <tr> 
      <td width="33" bgcolor="#FFFFFF" style="font-size: 10px; font-family: arial; line-height:30px;">&nbsp;</td> 
      <td width="138" height="30" align="left" valign="top"><a href="some link here" target="_blank"><img src="image here" alt="details" width="138" height="30" border="0"></a></td> 
      <td width="189" bgcolor="#FFFFFF" style="font-size: 10px; font-family: arial; line-height:30px;">&nbsp;</td> 
     </tr> 
    </table> 
    </body> 
    </html> 

這裏是一個鏈接到另一篇文章,我解釋瞭如何使用空的TD單元而不是間隔。 HTML Emails - Empty Tables/TR/TD as spacers

0

嘗試在<td>中使用style="line-height:your-image-size px;";此外,在圖像標籤內使用style="display:block;"