Gmail displaying gaps between images

前端 未结 8 1323
甜味超标
甜味超标 2020-12-05 09:49

Building an overly fancy HTML mail for a client. Code validates at http://validator.w3.org as XHTML 1.0 Transitional by direct input. Thing is Gmail displays gaps between

8条回答
  •  眼角桃花
    2020-12-05 10:23

    For any image in its own table cell, use display: block and line-height: 50%

    some text
    

    Set the padding to 0 and margin to 0, although setting margin to -1px might fix small gaps on iPhone/iPad.

    stick:

    ...within the body tag, not the head, as it'll get stripped out by some clients.

    Don't get hung up on if your code validates, getting email templates working cross-browsers and clients results in some fugly code!

    P.S. Watch out for Outlook 2007 (it uses the Word rendering engine) and Hotmail on Firefox.

提交回复
热议问题