Search code examples
htmlcssoutlookelectronic-direct-mail

Outlook 2013 client Add extra content to css?


Does outlook 2013 or infact any version of desktop client have problem with css rendering? there is this problem with table td background image in edm. my edm works perfectly fine if I sent it through web browsers but if I use outlook client the td background have slight css changes and I inspect the codes it add additional <span> and <p> before my td background.

This is the image of working edm enter image description here and this is the code

<td background="http://****Whatsnew.png" bgcolor="#E7E7E9" width="250" height="36" valign="top" style="background-repeat: no-repeat; display:block;">
            <!--[if gte mso 9]>
            <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:260px;height:36px;">
              <v:fill type="tile" src="http://*****Whatsnew.png" color="#E7E7E9" />
              <v:textbox inset="0,0,0,0">
            <![endif]-->
            <table style="color: white; font-size: 15px; display:block; Margin-left:12px;" cellpadding="0" cellspacing="0" border-collapse="collapse">
                <tr>
                    <td width="0" height="4" style="line-height:1px;font-size:1px;">
                        <font style="font-size:1px;display:none !important;display:none;">&nbsp;</font>
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <!-- 1ST COLUMN RIBBON TEXT -->
                    <td>What's New</td>
                </tr>
            </table>
            <!--[if gte mso 9]>
              </v:textbox>
            </v:rect>
            <![endif]-->
        </td>

and sent out through outlook client problem with css enter image description here

code inspect, addition css is added the p and span class enter image description here


Solution

  • Yes, there are some issues with HTML and CSS in Outlook, which uses Word to render HTML content. See: "Word 2007 HTML and CSS Rendering Capabilities in Outlook 2007"