tags:

views:

636

answers:

5

Hi,

I have a minor question:

Im doing a email that is being sent out and wish to have no margin at the top of the email - so that a image or table is flush with the top of the viewport.

I have tried sticking body tags in the html email with margin-top: 0px and it works fine in Thunderbird. However when testing in Microsoft Outlook there is a margin top applied to the content. Is there any way to get rid of this margin or is it not possible in Outlook.

Thanks

A: 

Maybe you could try to insert some css that overrules the body? Something like this:

*{
  margin: 0px;
  padding: 0px;
}
Bloeper
A: 

Thanks for the tips but neither work in Outlook.

Jobfad
A: 

You need to add the following to the <body> tag.

<body topmargin="0">

Ultimately though Outlook is poor at rendering CSS and it's going to get worse with 2010 unfortunately. In the mean time, in-line styles are really the only styles that will work in the majority of cases.

Jeepstone
Can you post/link your HTML/CSS? I don't normally get space at the top in Outlook so must be something fixable.
Jeepstone
A: 

Outlook is the bane of HTML emails everywhere.

Check out this discussion for some answers and tips.

Bottom line: code like it's 1998. Tables all over the place. Don't nest tables either, as that often causes problems. No external styles, so learn to love your inline style attributes.

Ugh, just thinking about it gives me a tummyache.

Scottie
A: 

did you ever get a solution to this problem?

I am having the same issue.

Kaskade