Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
FraserWilkinson

CSS only working while editor is open

Question

Hi there,

I've got a weird one, this little bit of code to add a sitewide bg image works on all pages while the custom css editor is open, but after saving and closing the editor, and navigating elsewhere on the website, the bg image no longer shows on any pages.

All of the other custom css above it still works, and I've tried shifting it to different places in the overall code, but still the same result.

Am I doing something daft here?

 

#siteWrapper {
     background-image: url("/s/SoWE-Logo-BG-white-Alpha3.png?");
     background-repeat: no-repeat;
     background-position: center center !important;
     background-size: cover;
}

 

Cheers for your help - if it's not obvious in the code, I can supply the site.

- Fraser

 

 

Edited by FraserWilkinson

Share this post


Link to post

4 answers to this question

Recommended Posts

  • 0

@FraserWilkinson You can open page after saving. Press F12 on your keyboard. Then click tab Console. You will see Error Message

I guess image url has problem.

Difficult to help without site url. Can you share link to your site?

Share this post


Link to post
  • 0

@tuanphan thanks for your reply, and you're absolutely right:

 Failed to load resource: the server responded with a status of 404 ()    SoWELogoBGWhiteAlpha3.png:1 

Digging deeper it says that https://static1.squarespace.com/s/SoWELogoBGWhiteAlpha3.png?  is 0B and throwing 404

This is my first Squarespsce site - soweglobal.com - and to create the image URL to use in the background I made a new not linked page as a link > link settings > file > upload file > select file > save

Then I used the resulting URL in the CSS 

Is there a better way to create an image URL?

Cheers for your help!

Fraser

 

 

Share this post


Link to post
  • 0

@FraserWilkinson Go to Home > Design > Custom CSS > Scroll down > Click Manage Custom File > Upload your image > Wait 1 minutes > Put the cursor at 

background-image: url("put cursor here"); > Click image you uploaded > Squarespace will automatically paste image url.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...