[英]remove space around html email in outlook
I have what looks like a 20px margin or padding in a html email in outlook and I can't get rid of it. 我在Outlook中的HTML电子邮件中看起来有20px的边距或填充,但是我无法摆脱它。 The same thing is happening in apple mail client except only on the top not on the left. 苹果邮件客户端中发生了相同的事情,只不过顶部而不是左侧。 I have set the body margin and padding to be 0. Anyone got any ideas to fix this. 我将身体边缘和填充设置为0。任何人都有解决此问题的想法。
<body bgcolor="#ffffff" style="margin: 0; padding: 0">
<table border="0" cellpadding="0" cellspacing="0" height="489" width="638" align="left"></table>
</body>
桌子本身是否有边缘和/或填充物?
Just like browsers, email clients have default styling for certain elements and default structuring. 就像浏览器一样,电子邮件客户端具有某些元素的默认样式和默认结构。 You may have a <p>
that is put in there by default which might have margin
pre-applied to it. 您可能在默认情况下将<p>
放在其中,可能已对其预先应用了margin
。 Try adding a line of css above your <body>
尝试在<body>
上方添加一行CSS
p { margin: 0; }
I haven't tested this, but it seems like it might be possible. 我没有测试过,但是似乎有可能。
Also, if that doesn't work, here's an answer to the same ? 另外,如果那不起作用,这是对同样的答案吗? on SO that suggests this can't be overcome. 在SO这表明这不能克服的。 :\\ :\\
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.