html - 页眉和高度问题之间的差距。 (展望 2013)

标签 html css email outlook

我只在 Outlook 2013 中遇到页眉和正文之间的差距。下面是 outlook 中的热截图:

enter image description here

它应该是这样的:

enter image description here

我的标题 HTML 代码:

<!-- start header -->
<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" align="center" width="580" style="font-family:Arial,Helvetica,sans-serif"   >
    <tr>
        <td width="241" height="51" valign="top" height="51" style="line-height: 51px;">
            <img src="http://limus.dev.limusdesign.com/fordfoundation/emails/ford-invitation-template/logo.png" style="display:block;">
        </td>
        <td width="179" height="51" valign="top" bgcolor="#00b0ed" style="background:#00b0ed;" style="line-height: 51px;" ></td>
        <td width="1" height="51" valign="top" style="line-height: 51px;" ></td>
        <td width="159" height="51" valign="top" style=" text-align:center; font-size:14px; " style="line-height: 51px;" >
            <table cellspacing="0" cellpadding="0"  width="159" style="font-family:Arial,Helvetica,sans-serif; text-align:center;"  border="0" height="51">
                <tr>    
                    <td width="159" align="left" valign="top" height="12" style="line-height:12px;" ><img src="http://limus.dev.limusdesign.com/fordfoundation/emails/ford-invitation-template/invitation.png" style="display:block;" height="12"></td>
                </tr>
                <tr>
                    <td  width="159" align="left" valign="top"  style="background:#00B0ED;" > <img src="http://limus.dev.limusdesign.com/fordfoundation/emails/ford-invitation-template/blank.png" style="display:block;" height="5"></td>
                </tr>
                <tr>
                    <td  width="159" align="left" valign="top" style="text-align:center; background:#00B0ED; " height="26" > <a href="#" style="color:#fff; text-decoration:none; font-weight:100; font-family:Arial,Helvetica,sans-serif; text-align:center; font-size:14px "><span style="color:#fff; text-decoration:none; font-weight:100; font-family:Arial,Helvetica,sans-serif; text-align:center; font-size:14px ">INVITATION</span></a></td>
                </tr>
                <tr>
                    <td  width="159" align="left" valign="top"  style="background:#00B0ED;" > <img src="http://limus.dev.limusdesign.com/fordfoundation/emails/ford-invitation-template/blank.png" style="display:block;" height="8"></td>
                </tr>
            </table>

        </td>
    </tr>
    <tr>
        <td width="100%" align="left" valign="top" colspan="4" height="1"><img src="http://limus.dev.limusdesign.com/fordfoundation/emails/ford/images/blank.jpg" height='1' width="1" style="display:block;"></td>
    </tr>
</table>
<!-- end header -->

最佳答案

这可能会有所帮助:

http://www.campaignmonitor.com/blog/post/3795/outlook-2013-says-no-to-empty-table-cells

基本上,这是 outlook 的填充问题 - 它与字体大小有关。在基于表格的网站布局和将字体大小设置为 1px 或使用讨厌的旧 1x1px 透明 gif 文件的老技巧的时代,这是一个相当老的问题:)

关于html - 页眉和高度问题之间的差距。 (展望 2013),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19839718/

相关文章:

javascript - 内联元素组 - Bootstrap 4

javascript - 图像尺寸和文件大小之间有关系吗?

javascript - 无法使用 iOS 向下滚动 100% 高度部分

javascript - javascript onclick 时防止列表元素移动

c# - 5.7.0 用户未在 asp.net core1 中使用 mailkit 和 strato 服务器进行身份验证

java - 使用java发送邮件时出现异常

html - 将固定元素定位在具有相同父宽度的父 div 底部

html - 为什么标签不使用整个形式

html - 为什么我在使用 bootstrap 时不能将上边距添加到我的 <a> 标签?

C# MailKit HTML 电子邮件以纯文本形式接收