Learn how to add a gradient to a background area in your Modern Editor design.
Topics covered in this article:
It may seem counter-intuitive, but an HTML color gradient is actually considered a background image. Since some email clients—including Outlook 2007/13/17 PC and Outlook.com—do not support background images, you'll need to set a solid color as a backup. The code included below will work well in most email clients, while falling back to a solid color in others.
We'll cover how to add gradients by pasting one line of code into the Modern Editor Styles UI.
1. Open your document in Modern Editor.
2.1 Click on the block where you want to add the gradient, and go to the Container section:
2.2 If the gradient needs to be added across the document, go to the Stylesheet tab instead:
2.3 Select a color in the "Background Color" field
This is the color that will display if gradients are not supported.
2.4 Scroll down and expand the "Background image (Advanced)" section
3. Paste one of the following code examples into the Background Image field as shown
5. Leave Background Repeat set to `Repeat` and Background Position set to `0% 0%`
If you need to make adjustments to the colors, just re-paste in one of our examples from Step 3