A user is attempting to add a custom CSS background image to specific sections in the Craft 15.2.0 theme (also tested in Dawn without success). The implementation involves uploading images to Shopify assets and referencing them via URL in CSS code.
Initial Problem:
CSS syntax errors occur regardless of using single or double quotes around the image URL
Screenshots show the code implementation and error messages
Proposed Solution:
A helper suggested adding CSS code wrapped in {% style %} tags above the </head> tag in theme.liquid file.
Current Status:
User implemented the suggested solution but reports no visible changes
Shared store URL (bookwyrmstrove.com) but declined to provide password access
Goal is to apply different background images to multiple sections individually, not site-wide
Latest Development:
The helper identified an issue in the code implementation, pointing to a specific line (marked with red line in screenshot) that needs to be removed. The discussion remains ongoing as the user awaits further clarification on the fix.
Summarized with AI on November 1.
AI used: claude-sonnet-4-5-20250929.
So, I have been trying to implement a custom CSS code background on a section in craft 15.2.0, I have tried in dawn also, but couldn’t get the image to apply there either.
I will attach an image of the code here as well as the error it is flagging.
I have tried encasing the command in both " and ’ but it liked neither of those and threw the same error
I have been uploading my images i created into my files within shopify assets for my store. I then copy the link from there, and use that as the image link for the background in my CSS code string. You will se in the pics..
Any advice on how to get this to work with craft 15.2.0? Is there a better way/code to use with this theme?
Thank you ever so much for your time and consideration! It is truly appreciated
I followed the instruction anyway, to see if it would change any part of the store, even if it swapped the BG on all for no… nothing changed in the end. This is probably my fault, though, not the theme..
this is how it still looks. the image i selected was a creamy lilac with some stars on, to just sit behind everything to add a little flavour to certain sections on the page - less plain.. you know? is there an issue with the image link, perhaps?
i just realised on your image you share, it says on line 256 this should apply… this is my current line 256 - is this over riding the CSS??? ( i know it was a few lines lower before, that was where my was, apologies!