2013-08-02 40 views
0

嘗試修復電子郵件的內容。這裏的問題的屏幕截圖:http://imgur.com/pEQvVqf中心表 - 任何一方的顏色

基本上有一個600寬的表,我需要與電子郵件的其餘部分相同的背景顏色和文本顏色。

然而,正如你看到任何一方是白色的 - 我在這裏做什麼?左右兩張桌子?並讓它們變灰或者我可以讓文本保持原樣並使表格寬度達到100%?因爲這會扭曲我的文本格式。

任何幫助,不勝感激 - 這裏是我的代碼(想不出格式正確地與4間距,以便使用反引號:

<table width="600" height="21" border="0" cellspacing="0" cellpadding="0" align="center" style="background-color:#ccc;font-family:verdana; font-size:10px; color:FFFFFF"> 
    <tr> 
     <td colspan="2" align="center" style="font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#000000; padding:10px 10px 0px 10px;"> 
      <font style="font-family:arial;font-size:10px;"> 
       You have received this email from an independent marketing company x x x x x x x .Company Reg. No.03976500 You have registered to receive our email advertising from one of our sites, and may unsubscribe from this newsletter by clicking <a href="">here</a><br> For more information on how we use your data, please read our <a href="http:/www.yoy.co.uk/privacy-legal" style="color: #5B5B5B;" target="_blank">privacy policy</a>. 
      </font> 
     </td> 
    </tr> 
</table> 

乾杯

+0

只需添加這個CSS - '體:背景顏色:#123456;' – Jacques

+0

謝謝youuu - 你可以把在一個答案,所以我可以給你點? –

+0

是的,只是發佈它。 – Jacques

回答

0

只需添加此CSS - body:background-color:#123456;

0

只需使用div標籤和一些特殊的CSS類

<div style="background-color:#ccc;font-family:arial;font-size:10px;"> 
    <table style="width: 600px;margin:0 auto;font-family:verdana;color:FFFFFF;">...</table> 
</div> 
+0

有時這種方法在電子郵件中不起作用。添加內聯樣式更安全。 – camainc

+0

電子郵件中的css類是一個糟糕的主意,您應該只使用樣式屬性來獲得完整的跨客戶端支持! – Pevara

+0

更新......... – matsko

0

T RY是這樣的:

<div style="background-color:#ccc; font-family:Arial, Helvetica, sans-serif; font-size:11px; color:#000000; color:#fff; width:100%"> 
    <div style="width:600px; margin: 0 auto; padding: 10px 10px 0 10px;"> 
       You have received this email from an independent marketing company x x x x x x x .Company Reg. No.03976500 You have registered to receive our email advertising from one of our sites, and may unsubscribe from this newsletter by clicking <a href="">here</a><br> For more information on how we use your data, please read our <a href="http:/www.yoy.co.uk/privacy-legal" style="color: #5B5B5B;" target="_blank">privacy policy</a>. 
    </div> 
</div>