html - gmail 中的额外填充

标签 html css gmail html-email

我正在制作 HTML 电子邮件程序。当我在 gmail 中查看模板时,它会在图像周围放置额外的填充。

我用过:

border-spacing:0;
display:block;

但它不起作用。

HTML

<table style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt; margin: 0 auto; border-spacing:0px;  margin-left: 15px;" align="left" border="0" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td align="center">
                <table style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;" align="center" border="0" cellpadding="0" cellspacing="0" width="110">
                    <tbody>
                        <tr>
                            <td align="center" height="100" valign="top" width="110">
                                <p style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;">
                                    <a class="modimg" style="text-decoration: none!important;" href="#">
                                        <img style="display: block; border: 3px solid #ffcbbc; outline: none;text-decoration: none;-ms-interpolation-mode: bicubic;" alt="" src="http://www.hubilo.com/eventApp/ws//images/speaker/profile/thumb/2712_1455949782.jpeg" border="0" height="110" width="110">
                                    </a>
                                </p>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
        <tr>
            <td class="h2" style="font-weight: bold;font-family: 'Montserrat', sans-serif; padding-top: 2px; padding-bottom: 0px;color:#ffffff;">
                <p style="padding: 0; margin: 0 auto; max-width: 110px; text-align: center;font-size: 10px;">
                    <span class="wrap_textbox">Mr. R. Chandrasekhar</span>
                </p>
                <p style="padding:0; margin:0 auto; max-width:110px;text-align: center !important; font-size: 8px;">
                    <span class="wrap_textbox">President at NASSCOM</span>
                </p>
            </td>
        </tr>
    </tbody>
</table>

谢谢。

最佳答案

我无法在上面重现您的问题,但我注意到缺少一些可能会解决问题的东西。

试试这个(从上面示例的第 6 行开始)。

<table style="border-collapse: collapse;mso-table-lspace: 0pt;mso-table-rspace: 0pt;" align="center" border="0" cellpadding="0" cellspacing="0" width="110">
    <tbody>
        <tr>
            <td align="center" height="100" valign="top" width="110">
                <a class="modimg" style="text-decoration: none!important;" href="#">
                    <img style="display: block; border: 3px solid #ffcbbc; outline: none; text-decoration: none;-ms-interpolation-mode: bicubic; display: block; mso-height-rule: exactly; line-height: 1;" alt="" src="http://www.hubilo.com/eventApp/ws//images/speaker/profile/thumb/2712_1455949782.jpeg" border="0" height="110" width="110">
                </a>
            </td>
        </tr>
    </tbody>
</table>

关于html - gmail 中的额外填充,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39147308/

相关文章:

html - 像我的图片一样的 Flex Grid

javascript - 如何在 BrowserWindow (Electron) 中打开 Markdown 文件?

python - 使用 beautifulsoup4 从 div 获取文本

image - IE9 - 11 SVG 背景模糊

带有 SMTP 传输连接的 Android Oauth 异常,Android 版本 2.3

html - 动画不工作。从左边移动 :0px to left :200px

javascript - 使用jquery在div中添加输入字段后,表单在回车时提交

css - css 可见溢出内容如何具有非透明背景以便隐藏下面的内容?

java - 如何使用 Chrome 访问我现有的 cookie?

google-apps-script - 通过Google脚本获取Gmail标签的所有子标签