Jump to content

Different Footer Background Image for Each Page

Recommended Posts

Hi everyone,

I'm wondering if anyone has custom css to change the Footer Background Image for each page.

I have four different footer background images to suit different colour pages on my site.
ie. red image to match red page, cream image to match cream page. 

Would it be possible to use sample code below but to tailor it to target the footer background image instead?
That way I can add the specific image URL into each pages advance code?

Site URL: landerse.au
Password:  red

Thanks for your help,

Hannah

<style>
#page {
background-image: url(https:URL) !important;
background-repeat: no-repeat; background: transparent;}
.page-section {background: transparent !important;}
</style>
Link to comment
  • Replies 15
  • Views 736
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

You can try

/*Combine with page Id to set background for specific page*/ footer .section-background-canvas.background-fx-canvas {
  visibility: hidden;
}

/*Combine with page Id to set background for specific page*/ footer .section-background-overlay {
  background-image: url(https://images.unsplash.com/photo-1683009427470-a36fee396389?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDF8MHxlZGl0b3JpYWwtZmVlZHwxfHx8ZW58MHx8fHx8); /*add your image url here*/
  opacity: 1 !important;
}

 

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

My testing

image.thumb.png.9dfd753944412ff6bd1cf03eeafc8756.png

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment
18 minutes ago, hannahnowlan said:

And would I put this code in the website css or page advance code?

both of them are fine. website css is recommended, page advance code require <style> tag

 

18 minutes ago, hannahnowlan said:

And, I'm guessing the footer section ID is directing where the code is affecting.
So repeat code with different footer section ID to target each different page?

Yes, you are right. You can install the following extension to get Squarespace id: 

Squarespace ID Finder (google.com)

Edited by Beyondspace

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Hi again @Beyondspace

I've added the following to website css but it doesn't seem to be changing the background.
Have I done something incorrectly?

Also, it seems to be interfering with some of my other footer custom code.

Thanks for you help!

//Custom footer background image//
section[data-section-id="66015b5d26f89479f48e33b2"] footer .section-background-canvas.background-fx-canvas {  visibility: hidden;}

section[data-section-id="66015b5d26f89479f48e33b2"] footer .section-background-overlay {
  background-image: url(https://static1.squarespace.com/static/63fb26284dc33403d8683ef2/t/66022a309154a32f34e8497a/1711417914168/Stone.png);
  opacity: 1 !important;}

Link to comment

Hi @tuanphan Thanks so much, the code is working better now!
See screenshot on page landerse.au/gallery are you able to help resolve the section thats still red in colour?
 

Not sure if its possible but on the homepage I am using the background design edits to make the image animated, could that be possible to add to other pages using code?

Thanks,

Hannah

Link to comment
7 hours ago, hannahnowlan said:

Screen Shot 2024-03-29 at 7.50.25 pm.png

Red border?
I'm also wondering why the scale of the image seems zoomed in/larger in the footer than the original image (below). 

Stone Landscape.png

Add to your custom css one more attribute to make image cover entirely

section[data-section-id="66015b5d26f89479f48e33b2"] .section-background-overlay {
  background-size: contain;
}

Let me know how it works on your site

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Hi @Beyondspace

Thankyou! It is working much better now, there are some fine red dividing lines/borders left.

Let me know if these could be removed?

Also, not even sure if this could be possible but on my homepage, I'm using the footer background image with animation effects, is it possible to mimic these here too?

Link to comment

Unfortunately, I've also just realised that this footer image is now appearing in all footers? ie. covering the original red homepage footer? Hmmmm, maybe it's just simpler if I stick with the standard red animated image footer for all site pages? What do you think?

Screen Shot 2024-03-30 at 10.38.34 am.png

Link to comment

Create an account or sign in to comment

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

×
×
  • 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.