How can I apply a background to my Craft theme?

Topic summary

A user seeks help applying a custom background image to their Craft theme on Shopify. They’ve provided their store URL (password-protected) and an attached image file.

Proposed Solution:
One responder suggests adding CSS code to the theme’s stylesheet (base.css, style.css, or theme.css):

  • Navigate to Online Store > Themes > Actions > Edit code
  • Add CSS targeting body.gradient with background-image, background-size: cover, and background-position: center center
  • Replace the URL with the desired image path

Important Limitation:
Another participant notes this CSS approach has limitations—it won’t apply the background uniformly across all page sections. For example, the homepage/landing page may not display the background as expected.

Recommended Next Step:
Since the user is working with the Craft theme, contacting Shopify’s authenticated support or the theme’s in-house support team is advised for comprehensive assistance. Access authenticated support through the Shopify Help Center link provided in the discussion.

Summarized with AI on November 17. AI used: claude-sonnet-4-5-20250929.

Hi

Can anyone kindly help me to put the attached background onto my ´Craft´theme.

mollycoddlemeg.co.uk

password - preepi

Kind regards

Molly

1 Like

Hi @Molly8

You like to attach an background image for the whole page?

You can try this one.

  • From your Shopify admin dashboard, click on “Online Store” and then “Themes”.
  • Find the theme that you want to edit and click on “Actions” and then “Edit code”.
  • In the “Assets” folder, click on “base.css, style.css or theme.css” file, depending on which file your theme uses to store its CSS styles. At the bottom of the file, add the following CSS code:
body.gradient {
    background-image: url('path/to/your/image.jpg');
  background-size: cover;
  background-position: center center;
}
  • And Save.
  • Replace the URL to the image youll like to use.
  • I hope it help.

Please don’t forget to Like and Mark Solution to the post that helped you. Thanks!

Hi @Molly8

Thank you for sharing the image file that you want to use as your background. Applying a background to your theme can actually be a bit more complex than it first appears. The code that @Made4uo-Ribe offered will apply the background to certain areas, but it won’t make all “background” spaces into the image you shared. For example, the homepage/landing page does not change:

Since you are using the Craft theme and you have the image file you are interested in using, you can reach out to our authenticated support and request help from our in house theme support. This should be something they can help with (although it is up to them to make the final call on that). To access our authenticated support, please follow this link: Shopify Help Center.