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

前端 未结 2 1191
小鲜肉
小鲜肉 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.

    0 讨论(0)
  • 2020-12-20 12:38

    I experienced similar layout problems when sending email newsletters. The solution was to use tables to position things properly. It's dated, but I think it was the only way to make things look the way they should.

    0 讨论(0)
提交回复
热议问题