首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gmail中edM的底边距问题

gmail中edM的底边距问题
EN

Stack Overflow用户
提问于 2015-09-07 12:23:46
回答 2查看 183关注 0票数 2

我在Marketo中创建了一个eDM时事通讯作为模板,它几乎可以在除gmail之外的所有内容中查看。带有图像的Divs似乎创造了一个底边距或其他东西,我想不出如何摆脱它。请参见下面的标记和一个带有红色矩形的图像,该图像表示问题边距区域。

谢谢!

代码语言:javascript
复制
<html>
<head>
<title>Responsive Template</title>
</head>
<body style="margin: 0px; padding: 0px;">
    <table cellpadding="0" cellspacing="0" valign="top" width="100%" align="center" bgcolor="#EBEBEB" style="padding: 0px; margin: 0px;">
        <tr>
            <td>
                <table align="center" cellpadding="0" cellspacing="0" valign="bottom">
                    <tr>
                        <td width="20">&nbsp;</td>
                        <td><div class="mktEditable" id="headerImage" style="margin: 0px; padding: 0px;"><img src="https://placeholdit.imgix.net/~text?txtsize=25&txt=610%C3%97100&w=610&h=100" alt=""/></div></td>
                        <td width="20">&nbsp;</td>
                    </tr>
                </table>
                <table align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="650"><div class="mktEditable" id="topBanner" style="margin: 0px; padding: 0px;"><img src="http://www.vision6.com.au/download/files/20677/2408194/Header.png" alt=""/></div></td>
                    </tr>
                </table>
                <table align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="20">&nbsp;</td>
                        <td width="610" bgcolor="#FFFFFF"><div class="mktEditable" id="mainContent" style="padding: 20px; margin: 0px;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed mollis pharetra mi ut finibus. Sed elementum eros ut augue egestas eleifend. Quisque nibh neque.</div></td>
                        <td width="20">&nbsp;</td>
                    </tr>
                </table>
                    <table align="center" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="20">&nbsp;</td>
                        <td width="610" bgcolor="#FFFFFF">
                        <div class="mktEditable" id="footerImage" style="margin: 0px; padding: 0px;">
                            <img style="margin: 0px; padding: 0px;" src="https://placeholdit.imgix.net/~text?txtsize=25&txt=610%C3%97100&w=610&h=100" alt=""/>  
                        </div></td>
                        <td width="20">&nbsp;</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</body>
<style>
    @media only screen and (max-width: 650px) {
            body {
                width: 100% !important;
                min-width: 100% !important;
                }

            img {
                float: none !important;
                height: auto;
                max-width: 100%;
                margin: 0px !important;
                padding: 0px !important;
                }
</style>
</html>

IMG(gmail):http://s4.postimg.org/p2cwbvdn1/gmailmarginissue.jpg

编辑*

IMG(无保证金问题/展望):http://s16.postimg.org/yikdy0md1/Screen_Shot_2015_09_07_at_2_39_30_pm.png

EN

回答 2

Stack Overflow用户

发布于 2015-09-07 13:04:06

Gmail域名并不总是支持div标签,因此移除div标签并将其应用于td,同时确保对td(例如:<td align="left" valign="top"></td>)进行对齐

票数 0
EN

Stack Overflow用户

发布于 2015-09-07 14:44:09

线高是问题所在。它增加了一个额外的3px。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/32431074

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档