2

我正在编写一个 HTML 电子邮件通讯模板。我已经在所有可能的浏览器和电子邮件主机中对其进行了测试,一切看起来都很棒。当它进入 Outlook 2010 时,它在预览模式下看起来很棒。但是当您双击并进入完整模式时,它会获取标题图像并将其放大到大于表格宽度。

我已经阅读了一些,他们建议将图像重新保存为 96dpi 图像而不是 72dpi。仍然没有帮助!!!!我已经多次阅读我的代码,但我仍然找不到修复程序。

任何帮助都会很棒!

我的代码如下。有人可以校对它并让我知道我是否做错了什么以及是否有修复

干杯

    <table border="0" cellpadding="10" cellspacing="0" width="599px" id="templatePreheader">
      <tr>
        <td valign="top" class="preheaderContent" style="border-collapse: collapse;">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
              <td valign="top" style="border-collapse: collapse;height:15px;">

              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>

    <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
      <tr>
        <td align="center" valign="top" style="border-collapse: collapse;">
          <table border="0" cellpadding="0" cellspacing="0" width="599" id="templateImage">
            <tr>
              <td valign="top" style="border-collapse: collapse;width:599px;">
                <img src="http://s3.amazonaws.com/S1MPLE/system/layouts/David%27s%20Designs/chefCode/top2.jpg" style="max-width: 599px; height: 100%; outline: none; text-decoration: none; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" alt="Image">
              </td>
            </tr>
          </table>
        </td>
      </tr>
     </table>

      <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
      <tr>
        <td align="center" valign="top" style="border-collapse: collapse;">
          <table border="0" cellpadding="0" cellspacing="0" width="599" style="background-color: #FFFFFF;" bgcolor="#FFFFFF">
            <tr>
              <td valign="top"  align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:14px;color:#ff0000;padding-right:20px;padding-left:20px;">
              This message is from Simple and Cheney Brothers.
              </td>
            </tr>
            <tr>
              <td valign="top"  align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:20px;color:#1b4456;padding-right:20px;padding-left:20px;"">
              Dear {{ offer.employee.first_name }}, 
              </td>
            </tr>
            <tr>
              <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#000000;line-height:18px;padding-right:20px;padding-left:20px;"">
             {{ deal.details|capfirst|linebreaksbr }}  
              </td>
            </tr>
             <tr>
              <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:20px;font-family: Arial, Helvetica, sans-serif;font-size:20px;color:#000000;line-height:18px;padding-right:20px;padding-left:20px;"">
              Sign Up & Save
              </td>
            </tr>
            <tr>
              <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:5px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#000000;line-height:18px;padding-right:20px;padding-left:20px;"">
              Go to: <a href="http://www.simplebrs.com/" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;"> www.simplebrs.com</a>
              </td>
            </tr>
          </table>
        </td>
      </tr>
     </table>

     <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
      <tr>
        <td align="center" valign="top" style="border-collapse: collapse;">
          <table border="0" cellpadding="0" cellspacing="0" width="599">
          <tr>
              <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:5px;padding-top:5px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:20px;"">
              username: <span style="color:#000000;">{{ offer.employee.email }}</span>
              </td>
              <td valign="top" align="right" style="border-collapse: collapse;padding-bottom:5px;padding-top:5px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:10px;"">
              call toll free: <span style="color:#000000;">1-877-302-0560</span>
              </td>
          </tr>
          <tr>
             <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:25px;padding-top:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:20px;"">
              password: <span style="color:#000000;">getdeals</span>
              </td>
              <td valign="top" align="right" style="border-collapse: collapse;padding-bottom:25px;padding-top:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:20px;"">
              call toll free: <span style="color:#000000;"> <a href="mailto:help@simpledealsnow.com" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;">help@simpledealsnow.com</a></span>
              </td>
          </tr>
          </table>
        </td>
      </tr>
     </table>

     <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
      <tr>
        <td align="center" valign="top" style="border-collapse: collapse;">
          <table border="0" cellpadding="0" cellspacing="0" width="599" id="templateImage">
            <tr>
              <td valign="top" style="border-collapse: collapse;width:599px;">
                <img src="http://s3.amazonaws.com/S1MPLE/system/layouts/David%27s%20Designs/chefCode/bottom2.jpg" style=width: 599px; height: 77px; line-height: 100%; outline: none; text-decoration: none; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;width:599px;" alt="Image">
              </td>
            </tr>
          </table>
        </td>
      </tr>
     </table>

     <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templatePreheader">
      <tr>
        <td valign="top" class="preheaderContent" style="border-collapse: collapse;">
          <table border="0" cellpadding="0" cellspacing="0" width="100%">
            <tr>
              <td valign="top" style="border-collapse: collapse;height:15px;">

              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>

  </td>

4

2 回答 2

0

我遇到过同样的问题。我通过确切的目标向我们办公室的几个用户发送了一封 html 电子邮件,其中只有 1 个用户遇到了上述问题。

实际导致该问题的原因是那台机器上的 DPI 设置设置为 125%。我让他们把它改回 100%(默认),这样就解决了这个问题。因此,本质上,与代码或图像大小/dpi 无关

这是在 Windows 7 中更改 dpi 设置的链接。

http://www.dummies.com/how-to/content/change-your-monitors-dots-per-inch-dpi-setting.html

于 2013-08-14T20:14:56.497 回答
0

好的,我更详细地查看了您的代码。你有一堆关于 HTML 的验证问题。

我没有说出了什么问题,而是清理了代码并将其重新发布在下面。我希望这对你有用。

有引号,最后有一个额外的。我还更改了您的一些 ID="" 属性(只是在它们的末尾添加了数字)。ID 属性应该是不同的(标准协议)。

<table border="0" cellpadding="10" cellspacing="0" width="599px" id="templatePreheader1">
  <tr>
    <td valign="top" class="preheaderContent" style="border-collapse: collapse;">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td valign="top" style="border-collapse: collapse;height:15px;">

          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer1" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top" style="border-collapse: collapse;">
      <table border="0" cellpadding="0" cellspacing="0" width="599" id="templateImage2">
        <tr>
          <td valign="top" style="border-collapse: collapse;width:599px;">
            <img src="http://s3.amazonaws.com/S1MPLE/system/layouts/David%27s%20Designs/chefCode/top2.jpg" style="max-width: 599px; height: 100%; outline: none; text-decoration: none; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;" alt="Image">
          </td>
        </tr>
      </table>
    </td>
  </tr>
 </table>

  <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer2" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top" style="border-collapse: collapse;">
      <table border="0" cellpadding="0" cellspacing="0" width="599" style="background-color: #FFFFFF;" bgcolor="#FFFFFF">
        <tr>
          <td valign="top"  align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:14px;color:#ff0000;padding-right:20px;padding-left:20px;">
          This message is from Simple and Cheney Brothers.
          </td>
        </tr>
        <tr>
          <td valign="top"  align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:10px;font-family: Arial, Helvetica, sans-serif;font-size:20px;color:#1b4456;padding-right:20px;padding-left:20px;">
          Dear {{ offer.employee.first_name }}, 
          </td>
        </tr>
        <tr>
          <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#000000;line-height:18px;padding-right:20px;padding-left:20px;">
         {{ deal.details|capfirst|linebreaksbr }}  
          </td>
        </tr>
         <tr>
          <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:20px;font-family: Arial, Helvetica, sans-serif;font-size:20px;color:#000000;line-height:18px;padding-right:20px;padding-left:20px;">
          Sign Up & Save
          </td>
        </tr>
        <tr>
          <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:10px;padding-top:5px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#000000;line-height:18px;padding-right:20px;padding-left:20px;">
          Go to: <a href="http://www.simplebrs.com/" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;"> www.simplebrs.com</a>
          </td>
        </tr>
      </table>
    </td>
  </tr>
 </table>

 <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer3" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top" style="border-collapse: collapse;">
      <table border="0" cellpadding="0" cellspacing="0" width="599">
          <tr>
              <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:5px;padding-top:5px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:20px;">
              username: <span style="color:#000000;">{{ offer.employee.email }}</span>
              </td>
              <td valign="top" align="right" style="border-collapse: collapse;padding-bottom:5px;padding-top:5px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:10px;">
              call toll free: <span style="color:#000000;">1-877-302-0560</span>
              </td>
          </tr>
          <tr>
             <td valign="top" align="left" style="border-collapse: collapse;padding-bottom:25px;padding-top:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:20px;">
              password: <span style="color:#000000;">getdeals</span>
              </td>
              <td valign="top" align="right" style="border-collapse: collapse;padding-bottom:25px;padding-top:0px;font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;padding-right:20px;padding-left:20px;">
              call toll free: <span style="color:#000000;"> <a href="mailto:help@simpledealsnow.com" style="font-family: Arial, Helvetica, sans-serif;font-size:12px;color:#1b4456;line-height:18px;">help@simpledealsnow.com</a></span>
              </td>
          </tr>
      </table>
    </td>
  </tr>
 </table>

 <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templateContainer4" style="border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0; background-color: #FFFFFF;" bgcolor="#FFFFFF">
  <tr>
    <td align="center" valign="top" style="border-collapse: collapse;">
      <table border="0" cellpadding="0" cellspacing="0" width="599" id="templateImage1">
        <tr>
          <td valign="top" style="border-collapse: collapse;width:599px;">
            <img src="http://s3.amazonaws.com/S1MPLE/system/layouts/David%27s%20Designs/chefCode/bottom2.jpg" style="width: 599px; height: 77px; line-height: 100%; outline: none; text-decoration: none; border-top-width: 0; border-right-width: 0; border-bottom-width: 0; border-left-width: 0;width:599px;" alt="Image">
          </td>
        </tr>
      </table>
    </td>
  </tr>
 </table>

 <table border="0" cellpadding="0" cellspacing="0" width="599px" id="templatePreheader2">
  <tr>
    <td valign="top" class="preheaderContent" style="border-collapse: collapse;">
      <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
          <td valign="top" style="border-collapse: collapse;height:15px;">

          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
于 2012-08-30T16:36:09.197 回答