Welcome to the Treehouse Community
Looking to learn something new?
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.