HTML CSS relative position not working in gmail

Viewed 271

I was trying to prepare a newsletter, I need an image to be in the middle (in terms of height) of two line as given below enter image description here

I used the below css

position:relative;top:-5px;

And it is working fine in browser, but not in gmail. Is there some way to make this work in gmail. Thanks in advance for all help.

1 Answers

Designing newsletters are somewhat finicky with divs as support is limited for some css features across various platforms and support varies from platform to platform.

For Newsletters, I suggest that you use HTML tables tags to design your newsletter as it provides bulletproof formatting for newsletters across different email clients including Outlook and Windows 10 Mail.

I think the CSS position is not supported in Gmail. Answers to similar questions are available in StackOverflow though.

You can refer to the following link for the compatibility check https://www.campaignmonitor.com/css/positioning-display/position/

Related