Remove gaps between images in Gmail and Yahoo! Mail

Gmail and Yahoo! Mail add a spacing between images. This issue first showed up when viewing emails in Firefox and later spread across other modern browsers including IE, Chrome, Opera, and Safari.

The good news is that there is a simple fix, by adding the following inline styles to each <img> tag within your HTML email will remove these gaps:

HTML


  style="display:block; border:0;"

3 Comments

  • nimmi says:

    it dosen’t work

    • David Bedenknecht says:

      Hi Nimmi,

      Sorry to hear that the fix hasn’t worked straight for you.

      A couple of things which may help in troubleshooting the cause:

      Have you placed the above code directly in your img tags? For example:

      Have you checked that your image(s) aren’t using any classes, ids or other styles which may be adding a padding or margin?

      Are there any other elements such as links around the images which may be adding a padding or margin?

      Depending on your CSS structure, in some cases adding an !important can help, such as: border: 0 !important;

      Let me know how you get along!

      Kind Regards,

      David

  • Vadym says:

    It’s worked for me

Leave a Reply

Your email address will not be published. Required fields are marked *