Getting images in Outlook to respect their container's size?
Hey fellow email folks,
I've been hunting for a possible solution for this for a while, and I'm afraid it may not be possible. Maybe you've come across a similar problem? I am attempting to get images in Outlook to display at the size of their container because I cannot edit the img tag with our email editor. Therefore, I cannot set the width on the img directly. Here is the code (simplified a bit) that I'm working with so far:
<table style="border-spacing:0;width:100%;text-align:left;" > <tr> <td style="max-width:275px;padding-top:0;padding-bottom:0;padding-right:0;padding-left:0;" > <!--[if (gte mso 9)|(IE)]> <table><tr><td width="275" height="220" style="height:220px !important; display:block; width:275px !important;"> <div width="275" height="220" style="width:275px !important; height:220px !important;"> //the email-building tool places the img tag with url and alt-text here and I cannot control how it does so. Original dimensions are larger than I want </div> </td></tr></table> <div display="none" style="display:none;"> <![endif]--> <div>email tool imports second image here that doesn't display if in Outlook</div> <!--[if (gte mso 9)|(IE)]> </div> <![endif]--> </td> </tr> </table>