簡體   English   中英

無法在Outlook 2013中居中顯示文字

[英]Can't center text in Outlook 2013

這是一個愚蠢的問題,但是已經嘗試了所有我能想到的事情,但仍然想不出如何在Outlook 2003中將這兩個文本單元居中。

在此處輸入圖片說明

這是指向完整html文件的鏈接: https : //github.com/justintemps/flash-updates/blob/master/dest/index-prod.html?ts=4

冒犯者(不會居中的部分)在下面。

<table class="body" align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="margin: 0 auto 0 auto; text-align: center;">
    <tbody>
        <tr>
            <td align="center" style="text-align: center;">
                <center>
                    <table class="bodyContainer" align="center" width="600" style="margin: 0 auto; max-width: 600px; padding-top: 5px; table-layout: fixed; text-align: center; width: 100%;">
                        <tbody>
                            <tr align="center">
                                <td class="mainImageContainer" align="center" style="margin: 0 auto; text-align: center;">
                                    <!-- INSERT LINK HERE -->
                                    <a href="" target="_blank">
                                        <!-- INSERT IMAGE URL HERE -->
                                        <img class="mainImage" width="600" alt="" src="http://www.ilo.org/wcmsp5/groups/public/---dgreports/---dcomm/documents/image/wcms_484941.jpg" style="margin: 0 auto; max-width: 600px; padding-top: 5px; table-layout: fixed; text-align: center; width: 100%;">
                                    </a>
                                </td>
                            </tr>

                            <tr align="center">
                                <td class="mainTitleContainer" align="center" width="600" style="margin: 0 auto; text-align: center;">
                                    <!-- INSERT LINK HERE -->
                                    <a class="noDecorate" href="" target="_blank" style="text-decoration: none;">
                                        <h2 class="mainTitle" style="font-family: Helvetica, Arial, sans-serif; color: #2f2f2f; margin: 0; padding-top: 5px; padding-bottom: 5px; text-align: left;">The International Labour Conference 2016 starts</h2>
                                    </a>
                                </td>
                            </tr>

                            <tr align="center">
                                <!-- INSERT SUMMARY HERE -->
                                <td class="bodyText" align="center" width="600" style="font-family: georgia, Palatino, 'Times New Roman', serif; font-size: 14px; line-height: 20px; text-align: left;">
                                    Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
                                    <span>
                                        <!-- INSERT LINK HERE -->
                                        <a class="decorate" href="" target="_blank" style="text-decoration: none; color: #37468E; font-weight: bold;">Read More&#187;</a>
                                    </span>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </center>
            </td>
        </tr>
    </tbody>
</table>

您有幾個text-align:left; 其中的會覆蓋您在父標記中所做的居中操作。

...padding-bottom: 5px; text-align: left;">The International...

...line-height: 20px; text-align: left;">Lorem ipsum dolor sit...

如果刪除text-align:left; 從上面的示例中,這些區域應居中對齊。

它在所有的HTML body標簽像work.please副本這里

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM