GMail and p.MsoNormal

Note: This post is from 2009. This is no longer applicable.

I have one favor to ask of the GMail team. It will help millions of people and has zero bad side-effects. Please put the following line in your CSS.

p.MsoNormal {margin: 0px}

Why is this important?
When Outlook sends mail that has images in the message itself, it embeds the image using a technique called UUEncoding. It basically turns the binary image into as string of letters and numbers.

The messed up part is what they do next. They wrap the image in a <p> tag. Specifically, a tag that looks like: <p class=”MsoNormal”>. In the CSS block above it, they have definitions of MsoNormal. In this case, they always put “p.MsoNormal {margin: 0px}”.

I have no idea the rationale of why they do this, but it has a very bad side-effect. GMail and a few other email providers strip out all CSS classes from emails. This means that the <p> tag will revert back to its normal state of margins. In any “designed email”, you are going to have some images. These will look retarded in GMail because of the margin problem.

What does this affect?
I’ve seen people’s signatures with images that look wrong. Rounded corners look wrong. Any image gets margins that it shouldn’t.

Adding in this one line of CSS would not hurt anything. This is a very proprietary css class that never has any variance. It’s always margin: 0px. It would fix emails for millions of people. No downside. Maybe 15 seconds of typing and then 3 months of approval process, but that’s all it would take.

Who out there knows someone at GMail? Help me to help you!

There is a separate “fix outlook” campaign that tries to get Microsoft to stop using this non-sense HTML. They are refusing. I have some nasty words for them, but that will have to wait. I think Microsoft is going to be difficult to deal with because they would have to write alot of code to make their editor work normally. However, GMail can fix this issue today if they wanted.

Please, help out the world. Don’t be evil. Add in the line.


Comments

7 responses to “GMail and p.MsoNormal”

  1. Glen Lipka Avatar

    If you are making a plugin for Outlook, there is a way to deal with this. You have to explore using the HTMLFidelity property.

    http://msdn.microsoft.com/de-de/library/microsoft.office.interop.word.emailoptions.htmlfidelity%28office.11%29.aspx

  2. Paul Fox Avatar

    I’m actually having a problem with this. Somehow one of my clients keeps getting in all of their paragraphs (they say they’re not sending through outlook). Now there is a line in the css that says Margin:0, and now there is no spacing between the paragraphs, so the email looks like one blob of text!

  3. Paul Fox Avatar

    Hmm… Your form stripped out the paragraph tag from the first sentence. I was trying to say that one of my clients keeps getting that msonormal class added to their normal paragraphs.

  4. seriously y does this exist? google goes 1 step forward with gmail and 2 steps back. is there a practical fix out there yet?

  5. What fixes this for me is giving the tags a class (other than MsoNormal obviously)

  6. ionalchemist Avatar
    ionalchemist

    Can’t believe this is still a problem. Although, I’ve got it worse. Outlook is adding table tags, p tags and span tags to my emails….all over the place.

  7. Doesn’t work when sending from Outlook to GMail APP (Android/iOS)