Jump to content

Adding custom page colour for individual gallery pages in CSS?

Recommended Posts

Site URL: https://heron-soybean-h3cg.squarespace.com/

I'm new to SS 7.1 and am currently building a new version of our website and have been coming up against some colour issues.

In 7.0 I was able to use custom css in each individual project page to create custom background colours:

<style>
     body:not(.collection-type-index):not(.collection-type-gallery) {
       background-color: rgb(229,176,181);
     } 
     </style>

In 7.1 the gallery function doesn't seem to allow you to add custom code to each individual page. As I will have more pages than the 10 colour themes (so can't create unique bg colours to apply there) I am using a 10x10px image saved into the background image for each section to turn the 'whole' page one colour. It works ok, but obviously has to load on launching each time and looks a bit messy.

Is there a way to add code to set the colour of each gallery page background in 7.1? I was thinking something that changed the universal BG colour style linked to each project would work but I don't have that level of expertise!

Any help would be much appreciated! 

Added the site link above, pw: hello1987

Link to comment
  • Replies 5
  • Views 470
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

Hi,

Squarespace 7.1 doesn't have Gallery Page. Can you share links to some pages which you are referring to?

Or you mean Portfolio Page?

If yes, you can edit each project >> Add a Code Block at bottom of page > Paste the code

Adding code to Code Block or Page Header are the same.

Edited by tuanphan

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Thanks for the reply @tuanphan I meant Portfolio Pages, yes. Is it possible to add custom color for the whole page background, instead of each section background? I'm currently using this for each section on the page and it seems like there must be a quicker way than for each section:

//seamless//
[data-section-id="6318b5250fd3916439211969"]
.section-background {
    background: #ff0028 !important;

Also do you know if there's a way to change the pagination bg colour to match the unique page color on each page - I'd like to make the yellow strip below a different colour on each page? 489048145_Screenshot2022-09-21at12_20_27.thumb.png.c6785591d8d41c52dab81f3c12bd5e4d.png

Link to comment
14 hours ago, AndyStudio said:

Thanks for the reply @tuanphan I meant Portfolio Pages, yes. Is it possible to add custom color for the whole page background, instead of each section background? I'm currently using this for each section on the page and it seems like there must be a quicker way than for each section:

//seamless//
[data-section-id="6318b5250fd3916439211969"]
.section-background {
    background: #ff0028 !important;

Also do you know if there's a way to change the pagination bg colour to match the unique page color on each page - I'd like to make the yellow strip below a different colour on each page? 489048145_Screenshot2022-09-21at12_20_27.thumb.png.c6785591d8d41c52dab81f3c12bd5e4d.png

hello1987

incorrect password

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
  • 2 weeks later...

Does anyone have a solution for this (now maddening) problem.

My site requires a scalable amount of pages with different colors. I'd also really like to use the galleries as they make image management far more efficient (I have hundreds of images to load).

So far I'm having zero luck finding a solution. As mentioned in this thread, Squarespace won't even allow me to use a 1x1 pixel as a BG image on these specific sections and my attempts with CSS have failed.

Someone?

 

Link to comment
10 hours ago, Agates said:

Does anyone have a solution for this (now maddening) problem.

My site requires a scalable amount of pages with different colors. I'd also really like to use the galleries as they make image management far more efficient (I have hundreds of images to load).

So far I'm having zero luck finding a solution. As mentioned in this thread, Squarespace won't even allow me to use a 1x1 pixel as a BG image on these specific sections and my attempts with CSS have failed.

Someone?

 

If you share link to your site + bg image, we can help easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

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.