Overview video
0:00 Custom backgrounds for content sections
0:03 Sections on a content page can have a background picture, a brand pattern, or a gradient. There are two ways to add one.
0:11 The first is built in. A section's Background image setting lets you upload a picture directly, with no code.
0:19 The picture sits behind the section's text and scales with the page.
0:24 The second uses your CSS file. A pattern image or a gradient is defined once, against one of the Custom slots.
0:32 Any section can then use it by choosing that slot as its background colour. Here, one section uses a pattern, and the next a gradient.
0:41 It's built from the section settings in the content template editor, and CSS Override. The step-by-step guide on this page shows both methods.
Step-by-step video
0:00 Add custom backgrounds to content sections
0:04 In this tutorial we'll add backgrounds to content page sections in two ways: with the built-in background image setting, and with reusable backgrounds defined in your CSS file.
0:15 Open your content page and click the cog on a section. Set Background image to Yes, then click Upload and choose your picture. Use a wide image and compress it first.
0:26 Background Size controls the scaling. Fill covers the whole section. Position sets which part stays in view, and repeat tiles small images.
0:36 Set Text colour to contrast with the picture, here white. Click Ok, then Save and Continue Edit.
0:43 On your storefront, the section shows the picture behind its text.
0:48 For a background you'll reuse, go to Content Management, then CSS Override. Under Uploaded Resources, upload your image.
0:57 In your CSS file, add a rule for a free slot, such as has-background-custom-3, pointing at the image with images, slash, and the file name. Add background-size cover. Slot four here holds a gradient, with no image at all. Then upload the CSS file.
1:13 Back on the page, open a section's settings and set Background color to Custom 3.
1:19 On another section, choose Custom 4. Save, then clear the cache.
1:24 Both sections now use the backgrounds from your CSS file, and any other section can reuse them.
1:31 That's it. Use the background image setting for a one-off picture, and a Custom slot for anything you want to reuse across your storefront.
No lines in the transcript match your search.