Add a Drop Down content area to let users choose from a predefined set of background colors when editing an email.
1. Create the color dropdown
Create a content area with the type Drop Down. Give it a descriptive name, such as Background Color.
Add an option for each color you want to offer. Use a readable color name for the label and its hex color code for the value. For example:
Copy the content area code generated for your dropdown. You’ll use it in the next step.
2. Add the background style
Open the Settings tab and scroll to Custom Head Html.
Add the following style. If the field already contains HTML or styles, keep that content and add this alongside it.
Replace %%contentarea211%% with the exact content area code you copied. Preserve any brackets or other characters included in that code.
This style applies the selected color to the email body and any tables directly inside it. Targeting both helps ensure the outer tables display the same background color as the body.
Save your changes.
3. Test the dropdown
Open the email editor and choose a color from the Background Color dropdown. Preview the email to check the result, then try another option to confirm the background updates.
Before sending, send a test email and check its appearance in your intended email clients.
If the background doesn’t change
- Check that each dropdown value is a valid hex color code, including the
#. - Confirm that you replaced the placeholder with the complete content area code.
- Check whether the affected section is a nested table or another element with its own background color. It may need an additional CSS selector.
Comments
0 comments
Article is closed for comments.