I am making a e-mail with HTML and CSS. On most of the e-mail clients it works fine but the Outlook Desktop App (I use Windows) ignores the margin: 0
and padding: 0
. I have declared it this way with CSS:
*{
margin: 0;
padding: 0;
}
And I can't find the solution for this.
Not all e-mail clients accept all forms of CSS selectors. Have a look at this CSS Support Guide for Email Clients to check which clients accept which CSS selectors.
As an alternative, you could add padding
to an inline element (for example, the body
tag):
<body style="padding: 0;">
</body>
However, Outlook Desktop does not accept margin
, unfortunately. Here is a list of all the CSS that Outlook does not accept.