开发者

table formatting without css

I have a table defined as

<table border="1"开发者_开发技巧 width="200px" height="auto">
<tr>
<td></td>
</tr>
</table>

Is there a way that I can align the table at the center of the page, apply background color to page without using css for any of these operations?


I assume you are doing something horrible like HTML email:

<center><table bgcolor="#ff00ff"></table></center>


<center>
    <table border="1" cellspacing="0" cellpadding="0" width="200" align="center">
        <tr>
            <td background="http://www.yourdomain.com/email/images/background.jpg" align="left">
            <!-- Stuff -->
            </td>
        </tr>
    </table>
</center>
  • http://www.email-standards.org/
  • http://mailchimp.com/resources/guides/email-marketing-field-guide/
  • http://www.1stwebdesigner.com/tutorials/ultimate-guide-html-emails/

The background attribute was never valid on table or td. Pretty sure the only thing the HTML 4 specification had background on was body. But I vaguely recall that it worked elsewhere and I think table cells was elsewhere--whether it works in Outlook you'll just have to test. bgcolor was valid all of those places...and is likely to work.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜