Jump to content

how to change lightbox background for product detail pages

Go to solution Solved by tuanphan,

Recommended Posts

Site URL: https://vuvuzela-cardioid-7tl5.squarespace.com/artworklist/p/mohanas-eyes

squarespace 7.1 

pw:  g0)Zq|Qdr@6Gv-IP9uXU

when looking at any product detail page i have, you can see the full sized image (in a lightbox) by clicking on the image in the page.  the lightbox is white and i'd like it to be black. 

I looked at theme editor and checked Galleries -> lightboxbox background  but its already set to the color I want to use. so is there some other place i can set this?  

Link to comment
On 2/8/2022 at 9:45 PM, genfoch01 said:

Thank you for the response!

turns out i also need to set the color on the lightbox  "X" button since its black by default.  and is there a way to set the opacity?  I think i'd like to set it at 100% so you can't see anything under it. 

John

Use this new code

.gallery-lightbox-background {
    background-color: rgba(0,0,0,0.5);
}
button.gallery-lightbox-control-btn polyline {
    stroke: green !important;
}

 

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

thanks again for the help!   

so the

.gallery-lightbox-background {
    background-color: rgba(0,0,0,0.5);
}

 

did work to make the background black i used rgba(0,0,0,1) to try to get a completely opaque background 

                    which got me close but not quite 100%

 

the 

button.gallery-lightbox-control-btn polyline {
    stroke: green !important;
}

seems to work on the scroll buttons on each side of the picture but not on the  "X " button that should appear on the upper right hand corner of the picture.  its black by default so i need to change it to some other color. 

 

 

 

Link to comment
  • 7 months later...
On 2/7/2022 at 6:45 AM, tuanphan said:

Add to Design > Custom CSS

.gallery-lightbox-background {
    background-color: black;
}

 

Dear Tuan,

This works great I have a problem with it in mobile.
 
It  works on the first link and not on the second one below in mobile.
 
 
 
This image will show you the problem:
 
 
Big thanks,
George

Screen Shot 2022-10-07 at 7.35.09 PM.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.