【问题标题】:Table in Outlook does not display text in the centerOutlook 中的表格不会在中心显示文本
【发布时间】:2020-10-06 20:32:21
【问题描述】:

我在 Outlook 中使用表格作为时事通讯。一切正常,直到涉及文本。我的文本在 Outlook 中而不是在中心,而在左侧站点上。

问题:

<table border="0" cellpadding="0" cellspacing="0" class="footer" width="100%">
                                        <tbody>
                                            <tr>
                                                <td class="two-column" style="padding:0;text-align:left;font-size:0; background-color:rgb(189, 33, 68);"><!--[if (gte mso 9)|(IE)]>
                                                                                                <div class="column" style="width:100%;max-width:640px;display:inline-block;vertical-align:top; text-align: center;">
                                                                                                <table border="0" cellpadding="0" cellspacing="0" style="border-spacing:0;font-family: Arial,Verdana,Helvetica,sans-serif;color:#333333;background-color:rgb(189, 33, 68);" width="100%">
                                                                                                        <tbody>
                                                                                                                <tr>
  <![endif]--></td>
                                                <td class="inner" style="padding-top: 5px; padding-bottom: 5px; padding-right: 20px; padding-left: 20px; font-size:0">
                                                <table border="0" cellpadding="0" cellspacing="0" class="contents" style="border-spacing:0;font-family: Arial,Verdana,Helvetica,sans-serif;color:#333333;width:100%;font-size:11px;text-align:left;text-decoration: none;">
                                                    <tbody>
                                                        <tr>
                                                            <td style="padding: 0px;"><font color="#FFFFFF">Um den Newsletter abzubestellen,</font> <a href="foo" style="font-family: Arial,Verdana,Helvetica,sans-serif; font-size: 11px; color: #333333; text-decoration: underline;"><font color="#FFFFFF">klicken Sie hier.</font></a><br />
                                                            <br />
                                                            <font color="#FFFFFF">F&uuml;r R&uuml;ckfragen wenden Sie sich bitte an <a href="foo" style="text-decoration:underline; color: #ffffff;">foo</a>foo<br />
                                                            E-Mails an den Abssender dieser Nachricht werden nicht bearbeitet.&nbsp;<br />
                                                            <br />
                                                            Ipsum lorem</font></td>
                                                        </tr>
                                                    </tbody>
                                                </table>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>

在 Outlook 中查看:

【问题讨论】:

    标签: html css html-table outlook html-tbody


    【解决方案1】:

    我在我的代码中发现了错误。

    在我的代码中的 closen table 标记之后是这个 td:

    </table>
            <!--[if (gte mso 9)|(IE)]>
               </td>
                   <td width="50%" valign="top">
                   <![endif]-->
    

    我将宽度从 50% 更改为 10%,现在可以使用了。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-06-17
      • 2021-07-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-22
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多