Absolute positioning in gmail emails

前端 未结 4 1828
耶瑟儿~
耶瑟儿~ 2020-12-09 01:09

I have a client who wants to send gift certificates to people who sign up on their site. They want it all designed out, so I can\'t just send a text email. I\'m trying to po

相关标签:
4条回答
  • 2020-12-09 01:53

    This did a trick for me: http://blog.rebelmail.com/absolute-positioning-in-email/

    Please note that is not a foolproof solution. I had some problems with it on Outlook and need to disable it.

    0 讨论(0)
  • 2020-12-09 01:55

    Unfortunately, you can't use position: absolute.

    Also, because Outlook is using the Word HTML renderer, you will also run into problems using absolute positioning.

    Most HTML emails are laid out with tables.

    Check this out.

    0 讨论(0)
  • 2020-12-09 01:56

    (I know I'm answering 4 years later... but probably it will help somebody...) If you look carefully, you don't have background images, you have possibly 10 images or more, many background colors and a complex table.

    There's no image behind a text. You could divide your table and compose your background image as multiple image fragments, and match the text's background color with these images.

    Really... in this template there are no "required" background images, just a complex table.

    0 讨论(0)
  • 2020-12-09 02:11

    I would suggest doing the whole thing as a table (div support is not 100% reliable in email clients). Use border properties to give the table the green border. Insert the image of the logo/banner in the first row of the table (merged three columns). Use the next 3 rows for the To, From and Amount (with the values in the merged second and third columns). And use the last column of the last row for the cupon code.

    If you really want the double border then you can either wrap the table in a div or for maximum compatibility, wrap the table in a 1 column, 1 row table.

    Yes it's ugly but email clients have extremely buggy and/or old implementations of HTML so this is not the time or place to be squirmish about ugly, non-web2.0-looking code.

    See the link posted by alex for more info.

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