Please help me make a picture my background instead of a color.

BRGolf
New Member
3 0 0

Can someone please help me.  I have looked on every answer in the forum and nothing is working.  I added a large picture to Assets.  It's labeled as golf_background.jpg.  I want that picture as my main body backround please. 

0 Likes
Ninthony
Shopify Partner
1637 224 613

In your css you're going to need to reference it with an asset_url:

<style>
body {
background-image: url({{ 'golf_background.jpg' | asset_url }});
background-size: cover;
background-repeat: no-repeat;
}
</style>

 

You'll either need to make a new css file with a liquid extension to do this, or you can copy and paste this code right after the opening <body> tag in your theme.liquid file in your Layout folder.

If my solution helped you, please like and accept as solution!
If you'd like to make any edits to your store, please send me a personal message and we can discuss what you'd like to accomplish :D
0 Likes
BRGolf
New Member
3 0 0
I don't think I am doing it right. I have never heard of these terms
before or even seen anything like this so I am probably doing it terribly
wrong. Here is my whole theme.liquid file. Can you please put it where it
needs to go so I can copy and paste it? Thank you for all your help.
0 Likes