Member Login



Forgot your Password?
Become a Member

 

 
Advanced Search
   
 
Outlook 2007 and 2010 ignore vertical alignment of images and insert gaps in cells
Posted: 23 August 2011 02:03 PM   [ Ignore ]  
Newbie
Rank
Total Posts:  1
Joined  2011-04-05

I have been having a recurring problem with outlook 2007 and 2010. It seems that outlook ignores the vertical alignment of images in table cells and it also partially disregards the background color of cells resulting in visual gaps in cells with images (HTML below). I ran an acid test and the code doesn’t show that the HTML was re-interpreted from what I wrote. Any thoughts on what might be causing this issue?

Here’s a link to the test doc: http://www.jmorrisongroup.com/public/AAAS/Outlook_Test/Outlook_Test1.html

Here’s the HTML I used for my test:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html >
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<title>Untitled Document</title>
</head>

<body>
<table width=“800” cellspacing=“0”  cellpadding=“0” style=“border:1px solid #999; margin-bottom:10px; “>
  <tr>
  <td align=“left” valign=“middle” style=“padding:20px; border-right: 1px solid #999;background-color:#036”>


Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nunc malesuada. Donec id nulla vitae nisl adipiscing vestibulum. Sed suscipit, lectus non vestibulum vulputate, felis nulla iaculis nunc, varius suscipit nisl ante non elit. In pede libero, nonummy vel, feugiat non, sagittis eu, neque. Duis gravida. Sed ante. Sed faucibus. Nulla vel mauris. Sed tristique egestas orci. Phasellus hendrerit massa et dui. Morbi bibendum mauris. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Morbi ac lorem. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos hymenaeos. Vestibulum sapien. In dignissim lobortis tellus. Vivamus pretium augue viverra lorem.

</td>
  <td valign=“bottom” bgcolor=”#000000”>http://[myURL]/images/image1.jpg</td>
  </tr>
</table>

</body>
</html>

Profile
 
 
Posted: 02 September 2011 11:32 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  137
Joined  2009-08-23

JMG,

Thanks for posting this example! We are seeing the same thing on our end.  In our test results, we provide the “code interpretation” for Outlook, sometimes that can shed some light on the situation but in this case, it isn’t helping much.

For reference, here is the output:

<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=
width
="100%" style='width:100.0%;mso-cellspacing:0in;
mso-yfti-tbllook:1184;mso-padding-alt: 37.5pt 37.5pt 37.5pt 37.5pt'

<
tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>  
<
td style='padding:37.5pt 37.5pt 37.5pt 37.5pt'>  
    <
div align=center>  
        <
table class=MsoNormalTable border=1 cellspacing=0 cellpadding=
        width
=800   style='width:600.0pt;mso-cellspacing:0in;border:solid 
        #999999 1.0pt;   mso-border-alt:solid #999999 .75pt;mso-yfti-tbllook:1184;
        mso-padding-alt:   0in 0in 0in 0in'
>   
        <
tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes;mso-yfti-lastrow:yes'>    
        <
td style='border:none; border-right:solid #999999 1.0pt;
        mso-border-right-alt:    solid #999999 .75pt;
        background:#003366;padding:15.0pt 15.0pt 15.0pt 15.0pt'

           
        <
p style='margin-top:0in;margin-right:0in;margin-bottom:7.5pt;margin-left:    
        0in;line-height:15.0pt'
><span style='font-size:10.5pt;
        font-family:"Gill Sans MT","sans-serif";    color:white'
>
        
Lorem ipsum dolor sit ametconsectetuer adipiscing elitNunc    
        malesuada
Donec id nulla vitae nisl adipiscing vestibulum
        
Sed suscipit,    lectus non vestibulum vulputatefelis nulla 
        iaculis nunc
varius suscipit    nisl ante non elitIn pede libero
        
nonummy velfeugiat nonsagittis eu,    nequeDuis gravida
        
Sed anteSed faucibusNulla vel maurisSed    tristique egestas 
        orci
Phasellus hendrerit massa et duiMorbi bibendum    
        mauris
Vestibulum ante ipsum primis in faucibus orci luctus et 
        ultrices    posuere cubilia Curae
Morbi ac loremPellentesque 
        habitant morbi    tristique senectus et netus et malesuada fames 
        ac turpis egestas
. Class    aptent taciti sociosqu ad litora torquent 
        per conubia nostra
per inceptos    hymenaeosVestibulum sapien
        
In dignissim lobortis tellusVivamus pretium    augue viverra lorem
        <
o:p></o:p></span></p
           
        </
td>    
        <
td valign=bottom style='border:none;background:black;
        padding:0in 0in 0in 0in'
>  
         
         <
class=MsoNormal><span style='mso-fareast-font-family:"Times New Roman";    
         mso-no-proof:yes'
><img  id="_x0000_i1025"    
         
src="http://www.jmorrisongroup.com/public/AAAS/Outlook_Test/images/image1.jpg"    
         
alt="Membership Form Graphic"></span><span style='mso-fareast-font-family:    
         "Times New Roman"'
><o:p></o:p></span></p>  
           
         </
td>   
         </
tr>  
         </
table>  
     </
div>  
 </
td
 </
tr>
 </
table

This actually renders just fine in Firefox so I have to chalk it up to the fact that the Word rendering engine is the problem.  I am going to tinker with this a bit more and report back.

Profile
 
 
Posted: 02 September 2011 12:07 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
RankRankRankRank
Total Posts:  137
Joined  2009-08-23

Interestingly, if you remove the padding on the first TD in the nested table, it resolves the issue.

Change this:

<td align="left" valign="middle" style="padding:20px; border-right: 1px solid #999;background-color:#036"

To this:

<td align="left" valign="middle" style="border-right: 1px solid #999;background-color:#036"

From there, you will have to create padding around your text by using paragraphs styles. Margin-bottom, margin-left, and margin-right are the only safe universal properties. Padding is often ignored by Outlook 2007/2010 and both the margin, and margin-top properties are not supported by Hotmail. BR tags are another fallback option.

This is the first time that I have seen this happen. In all of my other testing to date TD padding has been a fairly safe solution.

Hope this helps!

Profile
 
 
   
 
 
Follow us on Twitter Become a Friend on Facebook Subscribe to our Blog Digg Us! Recommend on StumbleUpon