2016-12-16 4 views
0

나는 HTML 전자 메일을 만들고 대부분의 클라이언트에서 잘 작동합니다. 내 디자인은 Mail이 시작되는 이미지에 의존합니다. 맨 위에 있어야합니다. 그러나 Outlook에서는 메일이 전체 메일 주위에 테두리를 표시합니다. 상단에는 20px, 측면에는 약 10px입니다. 여기 내 코드는 지금까지 있습니다 : outlook에 추가 공간을 표시하는 메일 맨 위에있는 이미지

<!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 charset="utf-8"> 
     <meta name="viewport" content="width=device-width"> 
     <meta http-equiv="X-UA-Compatible" content="IE=edge"> 
     <title>Title</title> 

    <!-- Web Font/@font-face : BEGIN --> 
    <!--[if mso]> 
     <style> 
      * {font-family: Arial, Verdana, sans-serif !important;} 
     </style> 
    <![endif]--> 
    <!--[if !mso]><!--> 
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700,800,300' rel='stylesheet' type='text/css'> 
    <!--<![endif]--> 
    <!-- Web Font/@font-face : END --> 

    <style type="text/css"> 
     html, 
     body { 
      margin: 0 auto !important; 
      padding: 0 !important; 
      height: 100% !important; 
      width: 100% !important; 
     } 
     * { 
      -ms-text-size-adjust: 100%; 
      -webkit-text-size-adjust: 100%; 
     } 
     div[style*="margin: 16px 0"] { 
      margin:0 !important; 
     } 
     table, 
     td { 
      mso-table-lspace: 0pt !important; 
      mso-table-rspace: 0pt !important; 
     } 
     table { 
      border-spacing: 0 !important; 
      border-collapse: collapse !important; 
      table-layout: fixed !important; 
      Margin: 0 auto !important; 
     } 
     table table table { 
      table-layout: auto; 
     } 
     img { 
      -ms-interpolation-mode:bicubic; 
     } 
     .yshortcuts a { 
      border-bottom: none !important; 
     } 
     .mobile-link--footer a, 
     a[x-apple-data-detectors] { 
      color:inherit !important; 
      text-decoration: underline !important; 
     } 
    </style> 
    <style> 
     /* What it does: Hover styles for buttons */ 
     .button-td, 
     .button-a { 
      transition: all 100ms ease-in; 
     } 
     .button-td:hover, 
     .button-a:hover { 
      background: #555555 !important; 
      border-color: #555555 !important; 
     } 
     /* Media Queries */ 
     @media screen and (max-width: 480px) { 
      /* What it does: Forces elements to resize to the full width of their container. Useful for resizing images beyond their max-width. */ 
      .fluid, 
      .fluid-centered { 
       width: 100% !important; 
       max-width: 100% !important; 
       height: auto !important; 
       Margin-left: auto !important; 
       Margin-right: auto !important; 
      } 
      /* And center justify these ones. */ 
      .fluid-centered { 
       Margin-left: auto !important; 
       Margin-right: auto !important; 
      } 
      /* What it does: Forces table cells into full-width rows. */ 
      .stack-column, 
      .stack-column-center { 
       display: block !important; 
       width: 100% !important; 
       max-width: 100% !important; 
       direction: ltr !important; 
      } 
      /* And center justify these ones. */ 
      .stack-column-center { 
       text-align: center !important; 
      } 
      /* What it does: Generic utility class for centering. Useful for images, buttons, and nested tables. */ 
      .center-on-narrow { 
       text-align: center !important; 
       display: block !important; 
       Margin-left: auto !important; 
       Margin-right: auto !important; 
       float: none !important; 
      } 
      table.center-on-narrow { 
       display: inline-block !important; 
      } 
     } 
    </style> 
</head> 

<body width="100%" bgcolor="28bffe" style="margin: 0; padding: 0;"> 
<div style="background-color:#28bffe;"> 
    <!--[if gte mso 9]> 
    <v:background xmlns:v="urn:schemas-microsoft-com:vml" fill="t"> 
    <v:fill type="tile" size="100%,35%" src="images/bg.jpg" color="#28bffe"/> 
    </v:background> 
    <![endif]--> 
    <table cellpadding="0" cellspacing="0" border="0" height="100%" width="100%" style="border-collapse:collapse; margin:0; padding:0;"> 
    <tr><td valign="top" align="left" background="images/bg.jpg" style="background-size: 100% auto; background-repeat: no-repeat; "> 
     <center style="width: 100%;"> 

      <!-- Visually Hidden Preheader Text : BEGIN --> 
      <div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family: sans-serif;"> 
       Title 
      </div> 
      <!-- Visually Hidden Preheader Text : END --> 

      <!-- Main Body Container for Snippets: Begin --> 
      <div style="max-width: 600px; margin: auto;"> 
       <!--[if (gte mso 9)|(IE)]> 
       <table cellspacing="0" cellpadding="0" border="0" width="600" align="center"> 
       <tr> 
       <td> 
       <![endif]--> 
       <!-- Email Body : BEGIN --> 
       <table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="" width="100%" style="max-width: 600px;"> 

        <tr> 
         <td style="text-align: center; margin:0; padding: 0; line-height: 0; font-size: 0;"> 
           <img src="images/hero.gif" width="600" height="" alt="Whoop" border="0" align="center" style="width: 100%; max-width: 600px;outline:none; line-height: 0; font-size: 0; margin:0; padding: 0;"> 
         </td> 
        </tr> 

        <tr> 
         <td style="padding: 25px 0; text-align: center; font-family: 'Open Sans', Arial, Verdana, sans-serif; font-size: 18px; mso-height-rule: exactly; line-height: 23px; color: #000000; font-weight:normal;"> 
          Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatiopbus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. 
         </td> 
        </tr> 

        <tr> 
         <td style="text-align: center;"> 
           <img src="images/slogan.png" width="600" height="" alt="Whoop" border="0" align="center" style="width: 100%; max-width: 600px;outline:none;"> 
         </td> 
        </tr> 

       </table> 
       <!-- Email Body : END --> 
       <!--[if (gte mso 9)|(IE)]> 
       </td> 
       </tr> 
       </table> 
       <![endif]--> 
      </div> 
      <!-- Main Body Container for Snippets: END --> 



      <!-- Main Body Container for Snippets: Begin --> 
      <div style=" margin: auto;"> 
       <!--[if (gte mso 9)|(IE)]> 
       <table cellspacing="0" cellpadding="0" border="0" width="100%" align="center"> 
       <tr> 
       <td> 
       <![endif]--> 
       <!-- Email Body : BEGIN --> 
       <table cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="" width="100%" > 

        <tr style="background-color: #1a1a1a;"> 
         <td style="text-align: center;"> 
           <img src="images/pier.jpg" width="276" height="" alt="Whoop" border="0" align="center" style="width: 100%; max-width: 276px;outline:none; padding: 10px 0;"> 
         </td> 
        </tr> 

        <tr style="background-color: #1a1a1a;"> 
         <td style="text-align: center; font-family: 'Open Sans', Arial, Verdana, sans-serif; font-size: 12px; mso-height-rule: exactly; line-height: 15px; font-weight:normal;"> 
          <br><webversion style="text-decoration: none; color: #8a8a8a;">WEBVERSION LINK</webversion><br> 
          <br><unsubscribe style="text-decoration: none; color: #8a8a8a;">UNSUB LINK</unsubscribe><br><br><br><br> 
         </td> 
        </tr> 

       </table> 
       <!-- Email Body : END --> 
       <!--[if (gte mso 9)|(IE)]> 
       </td> 
       </tr> 
       </table> 
       <![endif]--> 
      </div> 
      <!-- Main Body Container for Snippets: END --> 


     </center> 
    </td></tr> 
    </table> 
</div> 
</body> 

사람이이 문제에 대해 알고 있으며이 문제를 해결하는 방법을 알고 있나요

? 문제는 Outlook 2007,10,11에 있습니다.

답변

0

나는 순간에이를 테스트 할 수있는 시설이 없어,하지만 난의 스타일을 가지고 태그를 몸과 테이블 모두를 설정하려고 할 것 : 다양한 버전을 제공하기 위해

style="margin: 0 0 0 0; padding:0 0 0 0;" 

을 Outlook을 제대로 렌더링 할 수있는 가장 좋은 기회입니다.

전체 코드 (또는 여전히 문제가있는 축소 버전)를 게시 할 수 있다면 테스트하기가 쉽습니다.

+0

감사합니다. 나는 magin을 시도했습니다 : 0; 및 패딩 : 0; 여러 곳에서. 뉴스 레터는 그다지 길지 않아서 모든 것을 포함 시켰습니다. 당신도 일반적으로 같은 문제가 있습니까? 나는 대부분의 메일에서 백그라운드 img이 그렇게 중요하지 않기 때문에 모든 이메일에서 그것을 가지고있다. 큰 문제는 아니었다. 그러나이 전자 메일은 배경과 함께 히로미그를 결합하므로 포지셔닝은 매우 중요합니다. – Niqql