Subscriber email: GMail is converting height to min-height

浪尽此生 提交于 2019-11-29 22:59:21

Add vertical-align: top, display: block or float: left on the image.

By default, images are inline blocks and are aligned to the baseline of text. This means that if you were to put any text next to them, the bottom of the image lines up with the bottom of the "x", not the bottom of the "y". The "reserved space" for this descender is what's causing the space between your images.

Any one of the property declarations I mentioned above will stop the image from aligning it with the text baseline, all in different ways.

I just ran into this issue and solved it by setting max-height which it doesn't mess with.

I notice GMail does not interfere with a <td height="..."> attribute setting. So that might be a work-around if you can easily assign the problematic element into a table.

Try using line-height instead!

I had DIV tags that I was forcing to be display:table-cell

I resolved this by adding a 1px wide spacer image into the "cell" with a height attribute (not css style) set to the height I wanted the cell to be. This isn't ideal but got the job done and is cross-browser/email client.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!