HTML 电子邮件文本对齐和形象问题
我的 HTML 电子邮件有问题。 我的电子邮件在大多数情况下都可以正常工作,但当我发送到 Windows Live Mail 时就会出现问题。 1)在IE中的widoew live mail中打开电子邮件,即使我使用了'style =“text-align:left;”'和'align =“left”'选项,所有文本都会居中,我已经尝试过它们一起并分别尝试。
2) 在除 IE 之外的任何 Windows Live Mail 中打开,图像下方有间距。我使用了“显示:块;”和“边框折叠:折叠;”并将边距和填充设置为零。 我在 firefox 中使用 firebug 来查看问题所在,它显示了包含 img 标签的 span 标签或 ap 标签。我不知道为什么会这样做或如何解决它!
如果有人可以提供帮助,我将非常感激。
谢谢
,不,align =“left”不起作用,如果我使用align =“justify”或align =“right”,它似乎可以工作,但不能使用align =“left”。我意识到只有当我通过 Outlook 发送时才会遇到这些问题,我使用的是 Outlook 2007。在使用 Firebug 进行一些研究之后,在我看来 Outlook 正在将自己的类添加到电子邮件中。它似乎
在我的所有图像中添加了似乎属于 Outlook 的类。我知道 Outlook 不是世界上最好的程序,但在某些情况下,它是我发送电子邮件的唯一方式。有什么方法可以进入 Outlook 生成的代码并更改它,我知道这听起来有点激烈,但如果可以的话那就太好了。感谢所有的帮助,非常感谢。
I an having a problem with my HTML email.
My email is working correctly in most cases, the problem arises when I send to windows live mail.
1) opening the email in widoew live mail in IE all of the text becomes centered even though I have used the 'style="text-align:left;"' and the 'align="left"' options, I have tried them together and tried them seperate.
2)opening in windows live mail in anything other than IE the images have spacing below them. I have used the 'display:block;' and 'border-collapse:collapse;' and set the margin and padding to zero.
I used firebug in firefox to have a look and see what the problem is, it shows either a span tag or a p tag wrapping the img tags. I have no idea why it is doing this or how to fix it!
If anyone can help i'd be really greatful.
Thanks
no the align="left" doesn't work, If I use the align="justify" or align="right" it seems to work but not align="left". I have realised that I am only getting these problems when I send through outlook, I am using outlook 2007. after some studying with firebug it seems to me that outlook is adding its own classes to the email. it seems to be adding either or
around all of my images with classes that seem to belong to outlook. I know outlook is not the best program in the world but on some occasions it is the only way I can send emails. is there any way I can get into the code that outlook is producing and change it, I know that sounds a bit drastic but it would be really good if I could. thanks for all the help guys, really appreciate.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
许多邮件客户端仅支持旧版本的 html。例如,gmail 不会尊重任何 css 文件(有关 Acid 的电子邮件的更多信息),因此您可以对样式进行的操作受到限制。
您可以使用在线服务(例如 email on Acid 或 litmus)来测试您的电子邮件在不同客户端中的显示效果。
我建议保持设计非常基本,并使用基于旧式表格的布局。
A lot of mail clients support only older versions of html. gmail for example will not respect any css file (more information on email on acid) so you are restricted in what you can do with styling.
You can test how your email will look in various clients using online services such as email on acid or litmus.
I would suggest keeping the design very basic and using an old style table based layout.