Problem with height="1" in email

I have an email newsletter that I have designed. Several places there are 1px rules that I have coded as follows:

<tr height="1">
    <td width="30" height="1"></td>
    <td height="1" width="540" colspan="5" bgcolor="#cccccc"></td>
    <td width="30" height="1"></td>

But when the code gets to email clients, the height is 11px. Can anyone provide feedback on this?

Thanks in advance

Dave Dave, 8 years ago

Hi, this really depends on which email client you're using. Many of them have poor margin and padding support (such as Gmail and Outlook 2007). Can you provide any more details?

zapatoche, 8 years ago

I did a quick test on Outlook XP, Hotmail, Yahoo, lycos, Gmail, AOL mail
and it work fine. You probably tried it out of desperation but you can't specify a height on the <tr>
Validate your code to check if there is an error somewhere which could force your layout to display improperly, or check if adjacent cells don't have a height set.

If you have a non breakable space in the cell it won't collapse.

Can't say more like this.

jmp909, 8 years ago

try this...

    <td width="30" height="1"></td>
    <td height="1" width="540" colspan="5" bgcolor="#cccccc"><img src="images/spacer.gif" width="540" height="1" alt="" style="display:block"></td>
    <td width="30" height="1"></td>

Mathew Mathew, 8 years ago

I recall in the early days of web design having to explicitly set a line height because some browsers would reserve a default amount of space even with no text in there.

So you might also want to try that.

Get in touch with us on Twitter:
We're also on Facebook:

See why 200,000 companies worldwide love Campaign Monitor.

From Australia to Zimbabwe, and everywhere in between, companies count on Campaign Monitor for email campaigns that boost the bottom line.

Get started for free