Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
Sneaky supiscion I am going to knock Hotmail Out - please help
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.
Casey Ydenberg15,622 Points
Do you mean it adds it to the actually text of the email, or that the browser interprets it that way?
Ian Lunn4,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.