Jump to content

Custom background image suddenly stopped displaying

Recommended Posts

Site URL: https://krayvankirk.com

I've been using various background images across different pages, defining a main background under the Custom CSS and then over-riding that for a given page by inserting the CSS into the page header. I changed images today and suddenly the image will not display on the landing page, even though it properly displays on all other pages. (The landing page has the CSS injected into the page header). If I right-click on the landing page, it allows "View background image", and selecting that produces the proper image. If I select "Edit page" like I was going to change some of the Markdown blocks on the landing page, the image displays. 

I'm utterly confused. Sometimes deleting the code below and replacing it produces the displayed image, but only briefly in the editing browser. 

The code injection is:

Main {
   background-image: url("//static1.squarespace.com/static/5bd0b56ed74562581adad05c/t/6025f369816b6247c7beeb4b/1613099881367/logo_narrow.png")!important;
  background-position: top center;
  background-repeat: no-repeat;
  } 

I've got Developer Mode enabled for working on some other pages, but that has never affected this process before. The template is Brine, I believe. Thanks so much!!

Link to comment
  • Replies 2
  • Views 841
  • Created
  • Last Reply

UPDATE: I resolved this temporarily by just adding a MEDIA image in the Page Settings, but I don't like doing it that way. The MEDIA input doesn't allow for transparencies, so I have to define the background color as part of the image and it gets processed slightly differently, so that the landing page looks slightly different from the other pages. 

Link to comment

ADDITIONAL UPDATE: After mucking around a bit more, I discovered that the above code works perfectly fine for a landing page (i.e. Home) if the page itself is NOT an Index page with subsequent sections. The original landing page was an Index page; I had tried adding the code to both the primary Index Setting as well as the Section Setting, to no avail. Deleting the entire Index and just writing a new Home page as a simple page allowed the above to work fine. 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.