HTML email in Gmail - CSS style attribute removed

前端 未结 6 1505
慢半拍i
慢半拍i 2020-12-05 10:31

I\'m working on an HTML email and I am using MailChimp\'s Responsive Email Templates in combination with their CSS inliner tool. For the most part, the email looks great acr

6条回答
  •  广开言路
    2020-12-05 10:44

    As someone who regularly codes emails for marketing campaigns at my job, I feel your pain. Gmail, along with many other email clients, can be a bit funky to code for. For one, it strips out any CSS that's outside the body. So putting in things like media queries and document level styles don't work. The best piece of advice I can give you is hand code your inline CSS and try to avoid anything fancy. In fact, if you can use an HTML attribute to do your styling, use that in place of any CSS. An example would be bgcolor instead of background-color.

    Here is an article related to your specific problem I found. Best of luck.

提交回复
热议问题