Friday, March 8, 2013

GMail changes height to min-height

In email template we usually use table to control layout, so old school taught us to use tr for row, td for cell etc. My previous blog html email tips has more info about HTML email template tips and tricks. Here I only want to talk about how to deal with Gmail specific behavior.

If we want to control td height, we use inline CSS height to control the height. It works well on most email client, but not Gmail because it changes height to min-height. Two solutions based on my understanding.

1. Put a div to td, and set div height
2. Use line-height which is well supported by email clients

No comments:

Post a Comment