Outlook 2010调整了标题图像的大小。固定?

时间:2012-08-30 15:57:53

标签: html image resize outlook

我正在编写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>

  

2 个答案:

答案 0 :(得分: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>

答案 1 :(得分: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