html - TD 的宽度在 Outlook 2007/2010/2013 中被忽略

标签 html css

我在父表中创建了 2 个子表。表格的宽度在除 Outlook 2007/2010/2013 和 2016 之外的所有电子邮件客户端中看起来都很好。右侧的列向右移动并忽略两侧的 TD 宽度 (5%)。谁能帮我解决这个问题?

代码如下:

`

                    <!-- Second slider -->
                    <tr>
                        <td align="center" valign="top">
                            <table class="parentTable" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;">
                                <tr>
                                    <!-- 1st column - spacing -->
                                    <!-- <td valign="top" width="5%">&nbsp;</td> -->

                                    <!-- 2nd column - left section -->
                                    <td valign="top" width="50%">
                                        <table class="childTable" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;border:none;border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0;">
                                            <tr>
                                                <td valign="top" width="5%" >&nbsp;</td>
                                                <td width="40%"> 
                                                    <table class="list-table_1" border="0" cellpadding="0" cellspacing="0" style="border:none;border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0;">
                                                        <tr>
                                                            <td valign="top" align="left" >
                                                                <p class="heading_1" style="font-family: Georgia, serif;">Left Column Content 1</p>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td valign="top" align="center" height="10">&nbsp;</td>
                                                        </tr>     
                                                        <tr>
                                                            <td valign="top" align="center" >
                                                                <img src="" class="img-responsive" alt="" style="max-width: 100%;" />
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td valign="top" align="center" height="5">&nbsp;</td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" align="left" >
                                                                <p class="heading_2" style="font-family:Georgia, serif;">Left Column Content 2</p>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </td>
                                                <td valign="top" width="5%" style="border-right:1px solid #0060af;">&nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>

                                    <td valign="top" width="50%">
                                        <table class="childTable" border="0" cellpadding="0" cellspacing="0" style="table-layout:fixed;border:none;border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0;">
                                            <tr>
                                                <td valign="top" width="5%" >&nbsp;</td>
                                                <td width="40%"> 
                                                    <table class="list-table_1" border="0" cellpadding="0" cellspacing="0" style="border:none;border-collapse:collapse;mso-table-lspace:0;mso-table-rspace:0;">
                                                        <tr>
                                                            <td valign="top" align="left" >
                                                                <p class="heading_1" style="font-family: Georgia, serif;">Right Column Content 1</p>
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td valign="top" align="center" height="10">&nbsp;</td>
                                                        </tr>     
                                                        <tr>
                                                            <td valign="top" align="center" >
                                                                <img src="" class="img-responsive" alt="" style="max-width: 100%;" />
                                                            </td>
                                                        </tr>

                                                        <tr>
                                                            <td valign="top" align="center" height="5">&nbsp;</td>
                                                        </tr>
                                                        <tr>
                                                            <td valign="top" align="left" >
                                                                <p class="heading_2" style="font-family:Georgia, serif;">Right Column Content 2</p>
                                                            </td>
                                                        </tr>

                                                    </table>
                                                </td>
                                                <td valign="top" width="5%">&nbsp;</td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <!-- Second slider ends -->

                </table>



            </td>
        </tr>
    </table>

`

谢谢

最佳答案

不确定这是否对您有帮助,但我之前遇到过 Outlook 会忽略空表格单元格的宽度和高度的问题,即使存在 NBSP 也是如此。

您可以尝试添加与背景颜色相同的下划线之类的内容,看看是否有任何不同。小的透明 PNG 也可以。

另一种可能的方法是在 TD 上使用填充而不是指定宽度。

关于html - TD 的宽度在 Outlook 2007/2010/2013 中被忽略,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44398959/

相关文章:

html - 滚动内容和缓慢的背景滚动

html - 更改阴影的大小而不是实际的 png

html - -webkit-tap- 在选择下拉菜单上?

javascript - for of 循环和事件

html - CSS 'background-image' 未正确调整大小

javascript - Google map 在页面加载时未初始化

css - 这个 css 是做什么的 : ~"-moz-calc(..)"

javascript - 如何将标记头放在链接的中间

javascript - 固定位置的流体布局中的边界问题

CSS:如何在另一个div中获得两个 float div