Re: Background Image New Email Editor

kenmckown
Level 4

I am working on a new template, and I have run into an issue. I want to create a 2x2 section in the template, but when I set the background image, it spans the whole page. I just want it behind the two columns, not the whole page. Here is what it looks like.

kenmckown_0-1741283501437.png

I can't see a way to make the background image just behind the two columns. I tried all the background size images.

8 REPLIES 8
Dave_Roberts
Level 10

@kenmckown - unfortunately this looks like the expected outcome for the background image tool, maybe it's just another thing that got overlooked in the new editor 😕 

 

Here's a look at the code-view for some context of what's happening under the hood:

1) [BLUE] There's a blue outline around the "acr-structure" <div> which is the target container for the background image tool in the UI. Unfortunately, no matter what you do, this <div> runs the width of the page so setting a background image for the structure will always mean setting it for the entire row unless something changes in the UI.

2) [RED] There's a red outline around the "structure__table" <table> which IS actually set to the width of the email (in this case the default width of 750 -- which is too wide and a poor choice for a default, but that's another issue altogether). This should be the target for the background image controls to accomplish what you and most folks would be after here for adding a background image behind the two-columns rather than the entire row.

3) [GREEN] These are the columns inside the structure table -- just for reference.

 

Dave_Roberts_0-1764949604561.png

 

Proposed Solution:

For anyone reading this who is thinking about how to fix it, it would be a matter of mapping the UI controls for background image (and maybe background color too while you're at it) to the <table class="structure__table"> rather than the <div class="acr-structure">. There should be a clear separation between the styling for the edge-to-edge background (acr-structure) than for the actually structure background (structure__table). To be clear, each one needs a set of controls.

Currently the "viewport" controls are correlated to the <table class="structure__table">, but that looks like it's only available for the Body element styling rather than for each of the Structures within the body. A simple fix might be to add the "Viewport" controls into each Structure element and extend those controls from just background color to also include the background image controls.  

 

Sergio_Azevedo1
Level 2

Were you able to get this to work? I just tried using the editor today and I was able to get a bg image centered, but it required setting the width of the actual image to be the same as the email width (in this case 600px). The problem I'm facing now is getting it to work in Outlook. :-*(**

Dave_Roberts
Level 10

I wouldn't count on this working in Outlook unless something changes with the UI - it's clearly not built with an understanding of how XML (conditional tables) can be used in the modern email landscape. There's a bunch of places that add conditional tables where they aren't needed and other places like the background image where the controls are just not mapped correctly to work in Outlook. The core issue with here is the codebase and the reliance on the Acrite editor (which seems to be <div> based) instead of actually building something useful for email (which has always been <table> based).  This architectural issue also shows itself in the template conversion tool b/c it'll throw your old (Email 2.0) templates into Compatibility Mode (which removes most of the tools in the editor 👎) unless the architecture matches (eg. no parent <table> around the entire email, and no <tr>s for modules or rows within the email) and it's not really best practice outside of this Acrite tool to create a layout using <div>s instead of <table>s. 

 

Sergio_Azevedo1
Level 2

I don't believe you. There's just NO WAY Adobe would make such an oversight... /s

 

I was wondering if it would be worth playing with an html block and throwing in some vml in there, but, with no direct editing of the template html in this new version, I can't see how to add/update the xmlns tag in the head? Unless the html is exported, edited, and then exported back in? 

Christiane_Rode
Level 7 - Community Advisor + Adobe Champion

Are you setting the background image on the structure (not the contents)? If you're setting it on the Structure, on the Styles tab, under the image source link, there should be a section for "Image Placement." Are you able to choose "center" for your placement? 

 

When I do that on my end, that's how I get the image to be centered on my email area instead of spanning the full width of the editor panel.

kenmckown
Level 4

Yeah I set it to Centered, still spans the entire email page.

kenmckown_0-1741291831854.png

 

Disha_Goyal6
Level 6

@kenmckown, I tried different methods but facing the same issue.

 

Disha_Goyal6
Level 6

Hi @kenmckown, you can use HTML option to create this layout.