Help with assigning div with svg background image

Solved
New Member
3 0 0

Hi,

 

I'm having trouble assigning an svg as a background image to a div. The google chrome inspector tells me I have an invalid property name:

Screenshot 2019-12-09 at 12.25.27.png

The file name is definitely correct but the image just won't show. 

Screenshot 2019-12-09 at 12.16.35.png

If anyone could help, I'd appreciate it a lot.

 

Thank you in advance. 

 

0 Likes
Highlighted
Shopify Partner
440 84 96

Hello cuzobot,

Check this, working fine for me

.shopify-section.index-section h2{
    background-image: url({{ 'ghost.svg' | asset_url  }});
}

background.PNG

 

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
New Member
3 0 0

Thank you for your reply, but this still gives me the same error when changing just the file name. 

0 Likes

Success.

Shopify Partner
440 84 96

Your file must be scss.liquid
e.g i place code in custom.scss.liquid

Want to modify or custom changes on store hire me.
My Email: guleriathakur43@gmail.com
Skype: navrocks1
If helpful then please Like and Accept Solution.
If you are happy and want to donate small Click here (Its my paypal)
0 Likes
New Member
3 0 0

Ah yes that will be the problem! Thank you

0 Likes