【问题标题】:Center align in outlook前景中心对齐
【发布时间】:2014-06-28 01:29:51
【问题描述】:

我正在尝试创建在 Outlook 中不起作用的响应式电子邮件。你能帮帮我吗?我还尝试插入 div align center 但仍然无法正常工作。 现在它的中心对齐,但是当我在移动设备上查看它时它的左对齐。

<center>
<!--[if mso]>
    <table style="width: 300px;">
        <tr>
            <td>
            <![endif]-->
            <!--one-->
            <table border="0" cellpadding="0" cellspacing="0" align="left" width="225" height="158" bgcolor="#006699">
                <tr>
                    <td style="padding: 0;" align="left" class="responsive-image middle">
                        <img src="http://www.eruditus.com/emailer/0418_responsive_columbia/bg.jpg" style="display: block; margin: 0; padding: 0;">
                    </td>
                </tr>
            </table>
            <table border="0" cellpadding="0" cellspacing="0" align="left" width="225" bgcolor="#0093d4" height="158px">
                <tr>
                    <td width="" style="padding: 0 0 0 0; background-color: #0093d4; vertical-align: top;" bgcolor="#0093d4" valign="top">
                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#0093d4">
                            <tr>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 20px; padding: 5px 0 0;" bgcolor="#0093d4" valign="top">&nbsp;</td>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 20px; padding: 0;" bgcolor="#0093d4" valign="top">&nbsp;</td>
                            </tr>
                            <tr>
                                <td width="56" style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 20px; padding: 5px 0 0 10px;" bgcolor="#0093d4" valign="top">Email:</td>
                                <td width="273" style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 20px; padding: 0;" bgcolor="#0093d4" valign="top"><a href="mailto:epm_columbia@eruditus.com" style="color: #fff; text-decoration: none; font-size: 12px; display: block; padding: 5px 0 0;">EPM_columbia@eruditus.com</a>
                                </td>
                            </tr>
                            <tr>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 20px; padding: 0 0 0 10px;" bgcolor="#0093d4" valign="top">Phone:</td>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0px; padding: 0;" bgcolor="#0093d4" valign="top"><span style="font-size: 12px; line-height: 20px;">+91 22 6162 3112(India)</span>
                                </td>
                            </tr>
                            <tr>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0; padding: 0;" bgcolor="#0093d4" valign="top">&nbsp;</td>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0; padding: 0;" bgcolor="#0093d4" valign="top"><span style="font-size: 12px; line-height: 20px;">+971 044302011(Dubai)</span>
                                </td>
                            </tr>
                            <tr>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0; padding: 0;" bgcolor="#0093d4" valign="top">&nbsp;</td>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0; padding: 0;" bgcolor="#0093d4" valign="top"><span style="font-size: 12px; line-height: 20px;">+1 862 252 5823(USA)</span>
                                </td>
                            </tr>
                            <tr>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0; padding: 0;" bgcolor="#0093d4" valign="top">&nbsp;</td>
                                <td style="color: #fff; background-color: #0093d4; vertical-align: top; font-size: 12px; line-height: 0; padding: 0;" bgcolor="#0093d4" valign="top">&nbsp;</td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </table>
 </center>

【问题讨论】:

    标签: css html-table outlook html-email


    【解决方案1】:



    将表格放在div 中,并在div 标记中给出align="centre"。

    这可能会解决问题。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-27
      • 1970-01-01
      • 2020-08-05
      • 2016-09-13
      • 2020-09-21
      • 2016-11-16
      • 2015-10-14
      • 2013-02-07
      相关资源
      最近更新 更多