【问题标题】:html email padding-right issue on Mail client Mac邮件客户端 Mac 上的 html 电子邮件填充正确问题
【发布时间】:2014-07-12 00:41:30
【问题描述】:

让我的 html 电子邮件在 Mac Mail 客户端上正确呈现时遇到问题。基本上,显示屏右侧会出现约 20 像素宽的白色条带。

这是我正在使用的 html:

<div style="padding:30px !important; height: 60px; border-bottom: 10px solid #07d7ed;">
  <div style="width:100%">
      <div style="float:left">Logo</div>
      <div style="float:right">Some Text</div>
  </div>
</div>

任何想法,为什么会这样?

【问题讨论】:

    标签: macos padding html-email


    【解决方案1】:

    divs 并非在所有地方都受支持,并且通常带有自己的样式。尝试改用表格:

    <table width="100%" cellspacing="0" cellpadding="0" border="0">
        <tr>
            <td align="left" valign="top">
    
    
                <table width="48%" cellspacing="0" cellpadding="0" border="0" align="left">
                <!--Use less than 50% width to account for outlook which adds space to floated tables -->
    
                    <tr>
                        <td align="left" valign="top">Logo</td>
                    </tr>
                </table>
    
                <table width="48%" cellspacing="0" cellpadding="0" border="0" align="right">
                <!--Use align instead of float to account for older browsers and outlook which don't handle floats correctly-->
                    <tr>
                        <td align="left" valign="top">sometext</td>
                    </tr>
                </table>
    
    
            </td>
        </tr>
    </table>
    

    试试这个,看看它是否能解决您的问题。如果不行,看看能不能发个截图。

    【讨论】:

    • 很高兴为您提供帮助 :) 如果它对您有用,您能接受正确的答案吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-10-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多