I’m trying to add a background on a selected section with the custom CSS
{
background: url(“https://cdn.shopify.com/s/files/1/0739/4843/0646/files/JPG_YPHomepageWebsiteDesign_Section8-Background_120523_copy.jpg?v=1703142236”)
no-repeat center;
background-size: cover;
}
But it keeps saying " Correct the errors to save your custom CSS"
The image is already in shopify content files, and the URL is correct. I dont know why the error is still there.
Is my syntax incorrect?
Hello @JGTQM2018 ,
Can you share the store URL and the section where the CSS applied?
the theme is not live so I wont be able to share it.
Okay, You can try removing the space from you code:
{
background: url("https://cdn.shopify.com/s/files/1/0739/4843/0646/files/1766621_YPHomepageWebsiteDesign_EasyHome_1212...") no-repeat center;
background-size: cover;
}
Also if the theme is not live you can share the preview link for it:
You can right-click on the Edit Code > Copy link address and share it. Also please share the password if the store is password-protected.
You must add class of your section so the code will work.
I’ve tried the code you’ve corrected but it’s still now working :*(
Please see the preview code: https://vumdu2avt4uohph5-73948430646.shopifypreview.com
This code, with their image and its working but I dont understand why my asset isn’t from paste bin . com /Unnr44q5
Hi Dan,
Sorry I dont really follow, would you be able to clarify. I’ve added this code with on the shopify customization on the custom CSS for that section only.
What section do you want to apply the code?