2016-03-02 86 views
0

我正在嘗試爲簡報構建一個雙列布局,但由於某些原因,我的列有時會垂直對齊中心?HTML電子郵件兩欄問題

在某些版本的Outlook中它可以工作,但其他的不是?

任何想法如何解決這個問題?

enter image description here

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
 
<html xmlns="http://www.w3.org/1999/xhtml"> 
 
<head> 
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
 
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> 
 
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> 
 
<meta content="telephone=no" name="format-detection" /> 
 
<title>EMAIL NEWSLETTER</title> 
 
<style type="text/css"> 
 
body { 
 
\t -webkit-text-size-adjust: 100%!important; 
 
\t -ms-text-size-adjust: 100%!important; 
 
\t -webkit-font-smoothing: antialiased!important 
 
} 
 
img { 
 
\t border: 0!important; 
 
\t outline: none!important; 
 
} 
 
p { 
 
\t margin: 0!important; 
 
\t padding: 0!important; 
 
} 
 
table { 
 
\t border-collapse: collapse; 
 
\t mso-table-lspace: 0; 
 
\t mso-table-rspace: 0; 
 
} 
 
td, a, span { 
 
\t border-collapse: collapse; 
 
\t mso-line-height-rule: exactly; 
 
} 
 
.ExternalClass * { 
 
\t line-height: 100%; 
 
} 
 
span.MsoHyperlink { 
 
\t mso-style-priority: 99; 
 
\t color: inherit 
 
} 
 
span.MsoHyperlinkFollowed { 
 
\t mso-style-priority: 99; 
 
\t color: inherit; 
 
} 
 
.em_white a { 
 
\t text-decoration: none; 
 
\t color: #ffffff; 
 
} 
 
.em_white_und a { 
 
\t text-decoration: underline; 
 
\t color: #ffffff; 
 
} 
 
.em_orange a { 
 
\t text-decoration: none; 
 
\t color: #EC8026; 
 
} 
 
.em_orange1 a { 
 
\t text-decoration: none; 
 
\t color: #e44c16; 
 
} 
 
.em_marun a { 
 
\t text-decoration: none; 
 
\t color: #1e8faa; 
 
} 
 
.em_marun1 a { 
 
\t text-decoration: none; 
 
\t color: #1E8FAA; 
 
} 
 
.em_yellow a { 
 
\t text-decoration: none; 
 
\t color: #f5ebd7; 
 
} 
 
@media screen and (min-width:601px) { 
 
.container { 
 
\t width: 600px!important; 
 
} 
 
} 
 

 
</style> 
 
<!--[if (gte mso 9)|(IE)]> 
 
<style type="text/css">table{border-collapse:collapse!important!important}</style> 
 
<![endif]--> 
 
</head> 
 
<body style="margin:0;padding:0"> 
 
<table style="width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%" align="center" cellpadding="0" cellspacing="0" border="0"> 
 
    <tr> 
 
    <td align="center"><table class="container" align="center" cellpadding="0" cellspacing="0" border="0" style="border-spacing:0;Margin:0 auto;width:100%;max-width:600px;"> 
 
     <tr> 
 
      <td><table style="max-width:600px" width="100%" align="center" cellpadding="0" cellspacing="0" border="0"> 
 
       <tr> 
 
       <td><!--[if (gte mso 9)|(IE)]><table width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]--> 
 
        
 
        <table class="container" align="center" cellpadding="0" cellspacing="0" border="0" style="border-spacing:0;Margin:0 auto;width:100%;max-width:600px;" bgcolor="#1E8FAA"> 
 
        <tr> 
 
         <td bgcolor="#1E8FAA" valign="top" style="border-spacing:0;Margin:0 auto;width:100%;max-width:582px"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
 
          <tr> 
 
          <td valign="top"><!--[if (gte mso 9)|(IE)]><table width="582" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]--> 
 
           
 
           <table width="100%" border="0" cellspacing="0" cellpadding="0" style="max-width:582px" align="center"> 
 
           <tr> 
 
            <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
 
             <tr> 
 
             <td height="20" style="line-height:0px;font-size:0px">&nbsp;</td> 
 
             </tr> 
 
             <tr> 
 
             <td class="two-column" valign="top" style="text-align:left;font-size:0" dir="rtl"><!--[if (gte mso 9)|(IE)]><table width="100%" dir="rtl"><tr><td width="188"><![endif]--> 
 
              
 
              <div class="column" style="width:100%;max-width:188px;display:inline-block;vertical-align:top;text-align:left" dir="ltr"> 
 
              <table width="100%" border="0" cellspacing="0" cellpadding="0" class="column"> 
 
               <tr> 
 
               <td valign="top" class="em_hide"><table width="100%" border="0" cellspacing="0" style="max-width:198px;" cellpadding="0" align="right" class="column"> 
 
                <tr> 
 
                 <td><table width="100%" border="0" cellspacing="0" cellpadding="0" align="left"> 
 
                  <tr> 
 
                  <td><table style="max-width:198px;" border="0" cellspacing="0" cellpadding="0" align="left" class="column"> 
 
                   <tr> 
 
                    <td width="10">&nbsp;</td> 
 
                    <td mc:edit="text_2" class="em_center" height="42" valign="middle" align="left" style="font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:11px; line-height:15px; color:#ffffff;background-color:#1E8FAA;"><multiline style="font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:11px; line-height:15px; color:#ffffff;background-color:#1E8FAA;"><span class="em_white">Email not displaying properly? </span></multiline> 
 
                    <br /> 
 
                    <span class="em_white_und"> 
 
                    <webversion style="text-decoration:underline;color:#ffffff;"><span class="em_white_und" style="text-decoration:underline;color:#ffffff;">View it in your browser.</span></webversion> 
 
                    </span></td> 
 
                    <td width="10">&nbsp;</td> 
 
                   </tr> 
 
                   </table></td> 
 
                  </tr> 
 
                  <tr> 
 
                  <td height="20" style="line-height:1px;font-size:1px">&nbsp;</td> 
 
                  </tr> 
 
                 </table></td> 
 
                </tr> 
 
                </table></td> 
 
               </tr> 
 
              </table> 
 
              </div> 
 
              
 
              <!--[if (gte mso 9)|(IE)]></td><td width="384"><![endif]--> 
 
              
 
              <div class="column" style="width:100%;max-width:384px;display:inline-block;vertical-align:top;text-align:left" dir="ltr"> 
 
              <table width="100%" style="max-width:384px" cellpadding="0" align="center" cellspacing="0" border="0"> 
 
               <tr> 
 
               <td><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
 
                <tr> 
 
                 <td width="10" class="em_hide">&nbsp;</td> 
 
                 <td width="152" align="center" valign="top"><a href="http://www.website.org/" target="_blank" style="text-decoration:none"><img editable="true" src="/images/logo.jpg" width="152" alt="logo" style="display:block;font-family:Georgia, 'Times New Roman', Times, serif;font-size:14px;color:#ffffff;font-weight:bold;line-height:20px;max-width:152px;" border="0" /></a></td> 
 
                 <td width="222" class="em_hide">&nbsp;</td> 
 
                </tr> 
 
                </table></td> 
 
               </tr> 
 
               <tr> 
 
               <td height="20" style="line-height:1px;font-size:1px">&nbsp;</td> 
 
               </tr> 
 
              </table> 
 
              
 
              </div> 
 
              
 
              <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td> 
 
             </tr> 
 
            </table></td> 
 
           </tr> 
 
           </table> 
 
           
 
           <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td> 
 
          </tr> 
 
         </table></td> 
 
        </tr> 
 
        </table> 
 
        
 
        <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td> 
 
       </tr> 
 
      </table></td> 
 
     </tr> 
 
     </table></td> 
 
    </tr> 
 
</table> 
 
    
 
<table style="width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%" align="center" cellpadding="0" cellspacing="0" border="0"> 
 
    <tr> 
 
    <td align="center" valign="top"><repeater> 
 
     
 
     <layout label="Gallery"> 
 
      
 
      <table style="width:100%;table-layout:fixed;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%" align="center" cellpadding="0" cellspacing="0" border="0"> 
 
      <tr> 
 
       <td align="center"><table class="container" align="center" cellpadding="0" cellspacing="0" border="0" style="border-spacing:0;Margin:0 auto;width:100%;max-width:600px;"> 
 
        <tr> 
 
        <td><table style="max-width:600px" width="100%" align="center" cellpadding="0" cellspacing="0" border="0" bgcolor="#ffffff"> 
 
         <tr> 
 
          <td><!--[if (gte mso 9)|(IE)]><table width="600" align="center" cellpadding="0" cellspacing="0" border="0"><tr><td><![endif]--> 
 
          
 
          <table align="center" cellpadding="0" cellspacing="0" border="0" style="border-spacing:0;Margin:0 auto;width:100%;max-width:600px;" bgcolor="#ffffff"> 
 
           <tr> 
 
           <td width="5" class="em_hide">&nbsp;</td> 
 
           <td class="two-column" valign="top" style="text-align:center;font-size:0"><!--[if (gte mso 9)|(IE)]><table width="100%"><tr><td width="295"><![endif]--> 
 
            
 
            <div class="column" style="width:100%;max-width:295px;display:inline-block;vertical-align:top;text-align:center"> 
 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="column"> 
 
             <tr> 
 
             <td width="5" class="em_hide">&nbsp;</td> 
 
             <td align="center" valign="top" class="em_side_space"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> 
 
              <tr> 
 
               <td align="center" valign="top"><a href="#" target="_blank" style="text-decoration:none;"><img editable="true" src="http://placehold.it/350x250" width="285" alt="GALLERY ARTICLE 1" style="display:block;font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:15px; line-height:30px; color:#000000;font-weight:bold;max-width:285px;" border="0" class="em_full_width" /></a></td> 
 
              </tr> 
 
              <tr> 
 
               <td valign="top" bgcolor="#1E8FAA" style="background-color:#1E8FAA;"><table width="100%" style="max-width:285px;" border="0" cellspacing="0" cellpadding="0"> 
 
                <tr> 
 
                <td width="10">&nbsp;</td> 
 
                <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
 
                 <tr> 
 
                  <td height="15" style="line-height:1px;font-size:1px;">&nbsp;</td> 
 
                 </tr> 
 
                 <tr> 
 
                  <td align="left" valign="top" style="font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:13px; line-height:17px; color:#f5ebd7;"><span class="em_yellow"> 
 
                  <multiline style="font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:13px; line-height:17px; color:#f5ebd7;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</multiline> 
 
                  </span></td> 
 
                 </tr> 
 
                 <tr> 
 
                  <td height="15" style="line-height:1px;font-size:1px;">&nbsp;</td> 
 
                 </tr> 
 
                 </table></td> 
 
                <td width="10">&nbsp;</td> 
 
                </tr> 
 
               </table></td> 
 
              </tr> 
 
              <tr> 
 
               <td height="18" style="line-height:1px;font-size:1px;">&nbsp;</td> 
 
              </tr> 
 
              </table></td> 
 
             <td width="5" class="em_hide">&nbsp;</td> 
 
             </tr> 
 
            </table> 
 
            </div> 
 
            
 
            <!--[if (gte mso 9)|(IE)]></td><td width="295"><![endif]--> 
 
            
 
            <div class="column" style="width:100%;max-width:295px;display:inline-block;vertical-align:top;text-align:center"> 
 
            <table width="100%" border="0" cellspacing="0" cellpadding="0" class="column"> 
 
             <tr> 
 
             <td width="5" class="em_hide">&nbsp;</td> 
 
             <td align="center" valign="top" class="em_side_space"><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center"> 
 
              <tr> 
 
               <td align="center" valign="top"><a href="#" target="_blank" style="text-decoration:none;"><img editable="true" src="http://placehold.it/350x250" width="285" alt="GALLERY ARTICLE 2" style="display:block;font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:15px; line-height:30px; color:#000000;font-weight:bold;max-width:285px;" border="0" class="em_full_width" /></a></td> 
 
              </tr> 
 
              <tr> 
 
               <td valign="top" bgcolor="#1E8FAA" style="background-color:#1E8FAA;"><table width="100%" border="0" cellspacing="0" cellpadding="0"> 
 
                <tr> 
 
                <td width="10">&nbsp;</td> 
 
                <td valign="top"><table width="100%" style="max-width:285px;" border="0" cellspacing="0" cellpadding="0"> 
 
                 <tr> 
 
                  <td height="15" style="line-height:1px;font-size:1px;">&nbsp;</td> 
 
                 </tr> 
 
                 <tr> 
 
                  <td align="left" valign="top" style="font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:13px; line-height:17px; color:#f5ebd7;"><span class="em_yellow"> 
 
                  <multiline style="font-family:NewsGothicMT, 'Century Gothic', Arial, sans-serif;font-size:13px; line-height:17px; color:#f5ebd7;">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Lorem ipsum dolor sit amet, consectetur adipiscing elit.</multiline> 
 
                  </span></td> 
 
                 </tr> 
 
                 <tr> 
 
                  <td height="15" style="line-height:1px;font-size:1px;">&nbsp;</td> 
 
                 </tr> 
 
                 </table></td> 
 
                <td width="10">&nbsp;</td> 
 
                </tr> 
 
               </table></td> 
 
              </tr> 
 
              <tr> 
 
               <td height="18" style="line-height:1px;font-size:1px;">&nbsp;</td> 
 
              </tr> 
 
              </table></td> 
 
             <td width="5" class="em_hide">&nbsp;</td> 
 
             </tr> 
 
            </table> 
 
            </div> 
 
            
 
            <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td> 
 
           <td width="5" class="em_hide">&nbsp;</td> 
 
           </tr> 
 
          </table> 
 
          
 
          <!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]--></td> 
 
         </tr> 
 
         </table></td> 
 
        </tr> 
 
       </table></td> 
 
      </tr> 
 
      </table> 
 
      
 
     </layout> 
 
     
 
     </repeater></td> 
 
    </tr> 
 
</table> 
 
    
 

 
</body> 
 
</html>

回答

0

我固定它:

<!--[if (gte mso 9)|(IE)]><table width="100%"><tr><td width="295" valign="top"><![endif]--> 
0

通過設置高度爲你的努力VALIGN它應該工作的元素。

+0

感謝mmollle,但我認爲這將每一次改變,因爲在標題將改變文字的數量......或者我可以將它設置爲自動吧? –