0

I am using the bulletproof background tool found here to create background images that will work in outlook. Once this is done, I go to edit my newsletter template and paste the generated snippet into the code view and save then preview. It works splendidly.

However, going back into the template for further edits I have to keep re-pasting this code as magento annoyingly keeps removing the background attribute from the td and table. Very unusual, would anyone have an idea as to why this is occuring?

Snippet is:

`<table background="http://via.placeholder.com/1280x400" bgcolor="#FFFFFF" border="0" cellpadding="0" cellspacing="0" class="one-column" style="border-spacing: 0px; border-left: 1px solid #447282; border-right: 1px solid #447282; border-bottom: 5px solid #447282; width: 100%; max-width: 100%;">
  <tr>
    <td background="http://via.placeholder.com/1280x400" bgcolor="#ebfaff" valign="top">
      <!--[if gte mso 9]>
      <v:rect xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="mso-width-percent:1000;">
        <v:fill type="tile" src="http://via.placeholder.com/1280x400" color="#ebfaff" />
        <v:textbox style="mso-fit-shape-to-text:true" inset="0,0,0,0">
      <![endif]-->
      <div class="herotext">
          <p>Introducing Our New Product Range!</p>
                </div>
      <!--[if gte mso 9]>
        </v:textbox>
      </v:rect>
      <![endif]-->
    </td>
  </tr>
</table>`

The code is not out of the ordinary and I cannot fathom as to why this is occurring. If anyone could help I would thoroughly appreciate this.

1 Answer 1

0

The HTML background attribute is deprecated in HTML 4.01.

Symptoms

e.g.:

<body background='bgimage.jpg'>
<table background='bgimage.jpg'>
<td background='bgimage.jpg'>

and has been now replaced by the use of CSS:

eg.: <body style='background-image:url(bgimage.jpg)'>

Best practice in Email design stipulates that you do not use background images. You can of course still code for them, but you might experience some issues with display in some email clients. In this case the recommendation is to hard code an absolute URL of an image to the background tag so Engage will not be forced to try to handle the hosting of the image, i.e. not including the image in the ZIP file, but just referencing a full image URL. Please note however, that we strongly advise against using any sort of background image.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.