Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Sneaky supiscion I am going to knock Hotmail Out - please help

Hi there

I am putting an HTML email together and have a paragraph tag that has the following CSS

margin:0; padding:0; margin-bottom:0; font-size:18px; color:#6CACDF; font-family:Arial, Helvetica, sans-serif;

However when I send this to Hotmail it decides it wants to add its own margin of

margin: 0 0 1.35em 0;

Can anyone help with this please before it drives me mad.


3 Answers

Casey Ydenberg
Casey Ydenberg
15,622 Points

Do you mean it adds it to the actually text of the email, or that the browser interprets it that way?

Ian Lunn
Ian Lunn
4,558 Points

I haven't written an HTML email in a long time but a lot of email clients will add their own styles for whatever reason. As paragraphs are generally separated by space, I imagine Hotmail is trying to do just that to maintain readability.

I'm assuming you only have one paragraph of text, hence the reason for not needing space below it. Can you try to apply margin-top: -1.35em to the element below or just use a different element that Hotmail may not tamper with?

Hi Thanks for the responses much appreciated.

I think I sorted it by using a combination of nesting further tables and removing the p tags as and wrapping then in a span. Don't we just love HTML emails.