custom CSS code background on a section in craft 15.2.0

custom CSS code background on a section in craft 15.2.0

BookWyrmsTrove
Shopify Partner
16 0 0

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 💜Screenshot 2025-01-30 121512.pngScreenshot 2025-01-30 121852.pngScreenshot 2025-01-30 121926.png

H.J.
Replies 8 (8)

DaisyVo
Shopify Partner
4460 499 594

Hi @BookWyrmsTrove 

I hope you are well. You can follow our instructions below:


1/ Shopify admin > Online store > Edit code: https://prnt.sc/M4p-gua99Uf4
2/ Search for "theme.liquid" file: https://prnt.sc/b6xveIKe-Rh2
3/ Open the file and search for </head> tag and add the following code above </head> tag: https://prnt.sc/KWtKYyZkDtYJ

 

Here is the code for Step 3:

{% style %}
-- put your css code here --
{% endstyle %}

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution
BookWyrmsTrove
Shopify Partner
16 0 0

will this work only for the section i wish to change? And can i do this for multiple sections, with different images per section?

thank you ever so much for such a speedy reply!!

H.J.
BookWyrmsTrove
Shopify Partner
16 0 0

BookWyrmsTrove_0-1738240853773.png

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..😐

H.J.
BookWyrmsTrove
Shopify Partner
16 0 0

BookWyrmsTrove_1-1738240961333.png

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?

 

H.J.
BookWyrmsTrove
Shopify Partner
16 0 0

BookWyrmsTrove_2-1738241142697.png

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 </head> was, apologies!

H.J.
DaisyVo
Shopify Partner
4460 499 594

Hi @BookWyrmsTrove 

You need remove this one  (red line)

DaisyVo_0-1738504111469.png

 

Please let us know if our reply is helpful by giving it a Like or marking it as a Solution!

Avada SEO & Image Optimizer - The #1 SEO solution

topnewyork
Astronaut
1503 183 246

@BookWyrmsTrove 

Hi , kindly provide your store URL please and if it is password protected, please share the password as well. Thanks

Need a Shopify developer? Hire us at Top New York Web Design
Boost Your Store Sales with Volume/Tier Discount Try Big Bulk Discount
Create New Shopify Store For Just 1$/Month
BookWyrmsTrove
Shopify Partner
16 0 0

i provided necessary information in my above replies to DaisyVo . 

My shop link is Bookwyrms Trove Official Store

 

i, however, do not feel comfortable in sharing my store password with anyone, I'm sorry. i hope you can provide help and advise without.

H.J.