2012-07-17 66 views
0

我正在構建一個html電子郵件,我試圖讓我的包裝表顯示一個背景圖像,以便我的內表可以覆蓋文本頂部,但它不顯示在包裝上的背景圖像。包裝表不顯示bg圖像

<table border="0" cellpadding="0" cellspacing="0" height="489" width="639" align="left" style="background-image:url(../../images/email-bg.jpg); width:639px; height:489px"> 
     <table border="0" cellpadding="0" cellspacing="0"> 
      <tr> 
       <td align="left" style="font-family: Arial, sans-serif; font-size:10px; color:#477398 "><h1>This is my title text</h1></td> 
       <td colspan="2" align="left" style="font-family: Arial, sans-serif; font-size:10px; padding:10px 0 5px 2px; text-decoration:underline; color:#808184 "><a href="#">Continue</a></td> 
      </tr> 
     </table> 
    </table> 
+5

您的HTML無效。 – j08691 2012-07-17 16:51:29

+0

爲什麼表?爲什麼不是Divs? – PhD 2012-07-17 16:52:26

+0

什麼無效?使用表格是因爲它需要在舊電子郵件應用程序中工作。 – user1096509 2012-07-17 16:53:29

回答

1

試試這個,

<table border="0" cellpadding="0" cellspacing="0" height="489" width="639" align="left" > 
<tr> 
<td style="background-image:url(../../images/email-bg.jpg); width:639px; height:489px"> 
     <table border="0" cellpadding="0" cellspacing="0"> 
      <tr> 
       <td align="left" style="font-family: Arial, sans-serif; font-size:10px; color:#477398 "><h1>This is my title text</h1></td> 
       <td colspan="2" align="left" style="font-family: Arial, sans-serif; font-size:10px; padding:10px 0 5px 2px; text-decoration:underline; color:#808184 "><a href="#">Continue</a></td> 
      </tr> 
     </table> 
</td> 
</tr> 
    </table> 

請檢查您的第一臺不用tr和td元素。

+0

您的第一個「td」中的風格在哪裏? – 2012-07-17 16:57:23

+0

我認爲'font-family'不是一個HTML屬性,而應該在'style'屬性中。 – 2012-07-17 16:57:38

+0

你在這裏修了些什麼? – 2012-07-17 17:00:42