Jump to content

Remove close button border on gallery Lightbox

Go to solution Solved by tuanphan,

Recommended Posts

Hello! 

I recently did some customisation to my Lightbox for a strips gallery page on my website. The result is exactly what I wanted except I have not been able to remove the container border for the close button, as shown in the screenshot below. It only appears after using the previous / next navigation on the lightbox. Is there any way to remove it?

Page URL is www.fernandacortina.com/gallery. This is the code I used for the changes I made:

 

/*** Lightbox customisation ***/
.gallery-lightbox-close-btn-icon {
    top: 20px; 
  	bottom: auto;
    right: 10px; 
  	left: auto;
}

/* change the background color - gallery*/
.gallery-lightbox-background{
    background: #ffffff;
  	opacity:0.98;
}

/* change the close button color - gallery */
.gallery-lightbox-close-btn-icon {
  color: #9D9D9D!important
}

/* change the prev/next controls - gallery */
.gallery-lightbox-control-btn-icon *{
    color: #9D9D9D;
}

/* add close text before button */
.gallery-lightbox-close-btn-icon:before {
  	font-family: 'nourd-light';
  	font-weight: 500;
  	font-size: 13px;
  	letter-spacing: 1px;
  	color: #7D7C7C!important;
    content: "CLOSE";
  	position: absolute; /* Change from relative to absolute */
    top: 2px; /* Adjust this value as needed */
    left: -48px; /* Adjust this value as needed */
}

Screenshot2024-04-02at18_25_55.thumb.png.642e15dac6ef1839e30ef0788c1b9d0f.png

Edited by fercoresc
Added screenshot
Link to comment
1 hour ago, fercoresc said:

Hello! 

I recently did some customisation to my Lightbox for a strips gallery page on my website. The result is exactly what I wanted except I have not been able to remove the container border for the close button, as shown in the screenshot below. It only appears after using the previous / next navigation on the lightbox. Is there any way to remove it?

Page URL is www.fernandacortina.com/gallery. This is the code I used for the changes I made:

 

/*** Lightbox customisation ***/
.gallery-lightbox-close-btn-icon {
    top: 20px; 
  	bottom: auto;
    right: 10px; 
  	left: auto;
}

/* change the background color - gallery*/
.gallery-lightbox-background{
    background: #ffffff;
  	opacity:0.98;
}

/* change the close button color - gallery */
.gallery-lightbox-close-btn-icon {
  color: #9D9D9D!important
}

/* change the prev/next controls - gallery */
.gallery-lightbox-control-btn-icon *{
    color: #9D9D9D;
}

/* add close text before button */
.gallery-lightbox-close-btn-icon:before {
  	font-family: 'nourd-light';
  	font-weight: 500;
  	font-size: 13px;
  	letter-spacing: 1px;
  	color: #7D7C7C!important;
    content: "CLOSE";
  	position: absolute; /* Change from relative to absolute */
    top: 2px; /* Adjust this value as needed */
    left: -48px; /* Adjust this value as needed */
}

Screenshot2024-04-02at18_25_55.thumb.png.642e15dac6ef1839e30ef0788c1b9d0f.png

I tried to click arrows but can not reproduce the issue? What I need to do?

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
On 4/2/2024 at 7:55 PM, Beyondspace said:

I tried to click arrows but can not reproduce the issue? What I need to do?

With the arrows sometimes it doesn't show up, but if I use keyboard to move between images it appears.

Link to comment
  • Solution
On 4/5/2024 at 9:45 AM, fercoresc said:

With the arrows sometimes it doesn't show up, but if I use keyboard to move between images it appears.

You try this CSS code

button.gallery-lightbox-close-btn {
    border: none !important;
    outline: none !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

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.