html - 在电子邮件模板中将 <tr> 居中

标签 html css center

所以我是电子邮件 html 模板设计的新手。我正在尝试对齐 <tr>在一张 table 的中央。我的主管告诉我不要使用 align="center" ,而是使用 CSS。我想知道这是不是真的。

你不应该使用 align="center"在设计电子邮件模板时?如果不是,我应该使用什么?

最佳答案

HTML:

<table border="1" width="100%" cellpadding="0" cellspacing="0">
    <tr>
        <td align="left">Left Aligned</td>
        <td align="right">Right Aligned</td>
    </tr>
    <tr>
        <td align="center">Center Aligned</td>
        <td align="left">Left Aligned</td>
    </tr>
</table>

关于html - 在电子邮件模板中将 <tr> 居中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17045326/

相关文章:

javascript - JQuery 鼠标事件 : How to trigger a callback if the element moves?

html - 链接环绕图像使 div 稍高

css 3 float 问题

html - 我将如何在这个 DIV 中居中文本?

html - 为什么我不能水平和垂直居中我的 div?

CSS 问题 - 列在浏览器窗口缩小/放大时自动调整大小

html - 自定义文本下划线(使用 + 和 - 符号)

java - 使用浏览器在 Chrome 中实时查看 EventSource 是否已被弃用?

html - 我如何重定向特定的 tumblr 页面?

css - 仅在 IE 中页脚下方有空白