Changing Homepage Background

New Member
1 0 0

Hi, I would like to change background on homepage only!

 

I added this code but it change my other pages' background as well:

body {
    background-image: url({{ 'image.jpg' | asset_url }});
    background-repeat: no-repeat;
    background-position: center center;
    background-attachment: fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

Can anyone help? I am using Brooklyn theme. 

Thank you. 

0 Likes
Shopify Partner
1843 170 525

Needs to be

 

body.template-index {
  ..
  ..
}

Hope that helps!

I turn coffee in to code - since 1998
0 Likes