I’m doing some HTML/CSS for email and I need to eliminate the ul top margin in Outlook 2007. Unfortunately margin is not supported in Outlook 2007. (pretty horrible if you ask me)
Anyone know any tricks for removing the margin? Even if it’s ugly, I don’t care.
How about dont use a <ul> in the first place? And for the bullet markers just use straight up images. This is ghetto, but hey, this is the world of email.
Therefore you could try writing an inline style in the tag itself.
e.g.
<ul style="margin:0>
However I only use tables and inline styles when creating html emails these days. I try to allow the table to do all the positioning and avoid using margins where possible.
You’re right - it is ghetto, but it is email and Outlook 2007 CSS is yet another Microsoft fail. I’ll probably go with no ul and use image bullets as you suggest, as style: top doesn’t work either.
Maybe it is supported on some elements, but it definitely does not work on <ul>. I tried <ul style="margin:0> and it definitely does not work in Outlook 2007.
According to the msdn table I posted above margin is supported but I wouldn’t put it pass them to hard code some things or simply to strip your inline styles away.
You could try <ul style=“margin:0!important”> but I’m guessing that won’t work either.
I don’t have outlook 2007 to play with so I can’t confirm or deny. Do you have the whole email template that we can look at? (It will probably make no difference though.)
I am going to just abandon the ul tag and go with image bullets so I don’t really need to solve this. For grins and giggles though the code for the section is below. I have tried both <ul style=“margin:0;”> and <ul style=“margin-top:0;”>.
I dont mean to drag back an old thread but had to give my 2 cents on the issue.
yes, margin/padding is supported to an extent (like it work on some tags and not others; and left and right work but not top and bottom). Thats one thing I hate about those MSDN tables, they dont tell you the extent.