Outlook电子邮件丢失左填充

问题描述:

我知道这是非常普遍的问题,但我尝试了所有建议的解决方案,没有任何工作。Outlook电子邮件丢失左填充

电子邮件模板我在Outlook浏览器中丢失了左边距。我想为outlook添加左边距/填充,并让它在其他浏览器中被忽略,因为它们看起来很好,并且不需要额外的边距。我只需要在没有任何样式的情况下使用内联css来修复它。我在我的CSS中没有使用任何边距或填充。

这里是我的代码:

<table cellpadding="0" cellspacing="0" width="598" style="width: 598px;"> 
     <tr> 
      <td><span style="width:45px;height:20px;"><div style="width:25px;height:20px;">&nbsp;</div></span></td> 
      <td> 
       <span style="width:45px;height:15px;"><div style="width:25px;height:15px;">&nbsp;</div></span> 
       <div>some text</div> 
       <span style="width:45px;height:15px;"><div style="width:25px;height:15px;">&nbsp;</div></span> 
       <div>some text</div> 
       <span style="width:45px;height:20px;"><div style="width:25px;height:20px;">&nbsp;</div></span> 
       <div>some text</div> 
       <span style="width:45px;height:40px;"><div style="width:25px;height:20px;">&nbsp;</div></span> 
       <div>some text,</div> 
       <span style="width:45px;height:20px;"><div style="width:25px;height:20px;">&nbsp;</div></span> 
       <div>some text</div> 
       <span style="width:45px;height:5px;"><div style="width:25px;height:5px;">&nbsp;</div></span> 
      </td> 
      <td><span style="width:45px;height:20px;"><div style="width:25px;height:20px;">&nbsp;</div></span></td> 
     </tr> 
    </table> 

我尝试添加填充到每一个TD元素,但同时它在展望修复鉴于它在其他浏览器中增加了额外的填充。添加&nbsp;的结果相同。

任何帮助表示赞赏!

+0

你尝试保证金:自动? –

+0

据我所知,保证金被outlook – yinjia

+0

忽略是的,你是对的!但你有没有试过在桌子上玩“cellpadding和cellspacing”? –

<table cellpadding="0" cellspacing="0" width="598" style="width: 598px;"> 
     <tr> 
      <td style="width:100%;padding-left:10px"> 
       <tr> 
       <td> 
        <table> 
        <!-- your content here--> 
        </table> 
       </td> 
       </tr> 
      </td> 
     </tr> 
</table> 

尝试在主TD和风格它包裹的内容。这将强制整个电子邮件正文的填充。我已经尝试过这种方法,并为我工作。尝试一下,让我知道这是否有帮助。

+0

谢谢,虽然这没有解决问题 - 它为所有浏览器添加了额外的填充,不仅展望 – yinjia

+2

这甚至不是有效的HTML ... –

+0

@MikeMcCaughan你为什么这么认为? –