Css Elements Not Displaying Properly In Emails
Solution 1:
Judging from your images I would guess that the general box-sizing: border-box;
property is ignored. So I would try to avoid to use border
settings for the outer container (.box
) and instead use padding: 20px
(same as previous border thickness) and a background-color equal to the previous border-color
on it to get a border-like effect. (and remove box-sizing: border-box;
)
Solution 2:
Box-sizing is not supported by many email clients. I would consider alternatives.
Outlook has buggy support for padding and margin.
Outlook doesn't really support <div>
.
Outlook has some spotty support for in-document style sheets when it comes to width. Setting a hard value width="600"
will generally work better than width="100%"
. You can still declare either in-line or in-document width: 100% !important;
which most modern email clients like IOS will use, but Outlook tends to ignore.
Outlook Desktop ignores @media
queries. In addition, so does Android. So you can specify specific css values that Gmail, IOS and other clients will use.
If you inline the background colors in the tables or use <table bgcolor="#ff0000">
Android and Outlook will pick up the colors.
In general, your template looks good. It just needs fine-tuning to work better.
Good luck.
Post a Comment for "Css Elements Not Displaying Properly In Emails"