包装表没有显示bg图像

时间:2012-07-17 16:49:19

标签: html css

我正在构建一个html电子邮件程序,我正在尝试让我的包装表显示背景图像,这样我的内部表格可以覆盖文本顶部,但不会在包装器上显示背景图像。

 <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>

1 个答案:

答案 0 :(得分: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元素。