for the life of me I can't seem to be able to make Outlook 2007 & 2010 show an empty div with single pixel height.
The code is as follows:
<div height="1" style="height: 1px; font-size: 1px; background-color: blue;"> <img style="display:block;" src="http://666kb.com/i/cajepbho4e1p05f5g.gif" height="1" width="1"/> </div>
(the image inside the div is a 1x1 transparent GIF pixel image)
All mail clients render the single pixel height DIV perfectly, with the only exception of Outlook 2007 & 2010, which insist to display the DIV 2 pixels high.
Thanks heaps already to everyone for any ideas how to convince Outlook 2007 and 2010 to also show the DIV only with 1 pixel height,
Have you attempted the same appoach with a <td> instead as they're better supported for Outlook ?
<td height="1" bgcolor="Blue" style="font-size: 1px;"><img style="display:block;" src="http://666kb.com/i/cajepbho4e1p05f5g.gif" height="1" width="1"/></td>
yes I have actually tried <td> already, however there is another problem with <td>: the exact (vertical) placement of the <td>'s is different in different browsers (and mail clients, respectively), see here:
This is why I think there is no other way than using 1px divs instead :(
Still thankful for every idea how to force Outlook 2007 and 2010 to show a DIV with 1 pixel height,
I fixed it!
max-height: 1px; line-height: 1px;
to the style of the DIV's!
Yippie Ki Yay!
Superb, David - thanks for sharing your fix! That's awesome :D
Good Work, max-height doesn't appear to be supported in 07/10 but line-height certainly is, as a rule, if its an image within a td/div then Outlook will respect the line height you set, if it's text (i.e. ) then regardless of font size Outlook will enforce a default minimum line height unless you overriide it, hope that helps.
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