Lightboxes

Feb 29, 2024

Hi, My boss wants to change the color of the X that closes the lightboxes. I've only found a JavaScript to do this. Is there not a simpler way? 

var closeButton = document.getElementsByClassName("lightbox-close-btn")[0];
closeButton.style.backgroundColor = "#ff0000"; // Change to your desired color
closeButton.style.width = "40px"; // Adjust width if needed
closeButton.style.height = "40px"; // Adjust height if needed
closeButton.style.padding = "10px"; // Add padding for better visibility
closeButton.style.margin = "10px"; // Add margin for spacing
1 Reply