Different Background for landing Page and rest of store

Hello!

I want to remove the gif background I added to my landing page from the rest of the store. For the background I used the code:

".gradient {
background: var(–gradient-background);
background-attachment: fixed;
background-image: url(https://cdn.shopify.com/s/files/1/0728/1704/9928/files/ezgif.com-gif-maker.webp) !important;
background-color: transparent !important;
background-position: top left !important;
background-size: cover !important;
background-repeat: no-repeat;

}"

I added that at the bottom of base.css and it looks like this (Attachment 1):

That is exactly what I was going for but unfortunately the background is also on every other page of the store, can anyone help me and tell me how I remove it from everywhere else but the landing page?

1 Like

Hi @OnyxAtelierM23

Add this in your theme.liquid file instead. Please follow the instructions below

  1. From you Admin page, go to Online store > Themes > Click the three dots on the theme you want to edit > Edit code
  2. Go to Layout folder and open the theme.liquid file
  3. Find the line code , make a new line after it and place the code below
{% if request.page_type == "index" %}

{% endif %}