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! While you're at it, check out some resources Treehouse students have shared here.
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 trialGraham Davidson
Courses Plus Student 14,966 PointsSneaky 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.
G
3 Answers
Casey Ydenberg
15,622 PointsDo you mean it adds it to the actually text of the email, or that the browser interprets it that way?
Ian Lunn
4,558 PointsI 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?
Graham Davidson
Courses Plus Student 14,966 PointsHi 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.
G