MS Outlook 2007 <br> Problem
I've made a HTMLemai开发者_StackOverflow社区ler for a client. The emailer has a few line breaks with it. On other clients it looks perfect, until i come across MS Outlook 2007. Outlook doesnt seem to recognize the <br>
and the width that iset inside a <div>
. Is there a fix for this? Thanks in advance.
<table width="602px" cellpadding="0" cellspacing="0" border="0" align="center">
<tr>
<td colspan="3">
<p align="center" style="font-family: arial; font-size: 11px; color: #000000;">If you are unable to read the contents of this email, please <b><a href="#" style="color:#000000; text-decoration:none;">click here</a></b> to view the online version.</p>
<br>
</td>
</tr>
<tr>
<td colspan="3"><a href="#"><img src="#" width="602" height="161" alt="#"></a></td>
</tr>
<tr>
<td colspan="3" style="border-top:2px black solid;"><br><br></td>
</tr>
Outlook is a pain for most things HTML email. You could try self closing the br tag <br />
, and maybe putting it inside the paragraph element, but I doubt it'll get it working on its own. Other things I'd try are to add a none breaking space
character to force some kind of layout into the td cell, or even going proper old-school and inserting a white padding image with the height set to whatever you need.
Converting comment to answer, as this was just brought to my attention:
To my knowledge, a <br />
is ignored if there is no additional content to break. Maybe try adding a
after your line-breaks and see if the result is what you're expecting? (Plus, I don't hold much faith to Outlook's rendering as it uses MS Office's engine instead of IE).
<br>
Put 2 lines instead 1.
So I made a component called "br"
<table><tr><td> </table></tr></td
Works in all email clients
The problem comes from declaring <br>
in a new line. Outlook automatically adds a new line plus the br
. Try putting them in the same line as the previous code.
Aside from the suggestions already made, I would recommend using some of the HTML newsletter creators that are available these days;
- Mosaic
- Publicate
I know from my company Publicate, we spend a large amount of time testing and optimising the HTML so that it can be exported and renders correctly in Outlook.
We use Email on Acid as part of the testing process, which might be helpful to you too, or also check out Litmus if you are wanting to code your own.
精彩评论