Gmail removes “position:relative” as inline CSS (Email Template)

前端 未结 2 1196
小鲜肉
小鲜肉 2020-12-20 12:05

From what I understand Gmail doesn\'t accept CSS blocks in the head at all, which is why I have been adding a bunch of inline CSS to my email template to make it work.

2条回答
  •  星月不相逢
    2020-12-20 12:31

    Sadly, I suspect you may have to abandon your perfectly reasonable ideas of divs and positioning when designing for email. CSS support in email clients is a tangled nightmare.

    The only (relatively) surefire way of forcing layout on email is to go with an old school tables layout, which is unfortunate, but unavoidable.

    Campaign Monitor has an excellent summary of email client CSS support here.

提交回复
热议问题