How to change the lightbox color

Posted in: Newspaper
Post count: 200

Hi there,

I’m using lightbox to display the images on a website that I manage. I need to change the color of the lightbox from black to white. How can I do this?

Thanks,
A

Post count: 23312

Hello DaveS,

Please provide your website URL and also, you can give me some useful screenshots where to show me exactly what you want to change.

Thanks for your understanding!

Post count: 200

Hi Catalin,

here’s the url of the website: http://bit.ly/2nfzt52
If you scroll down a bit and open an image, it appears within a lightbox which is in black color. I’d like to chanage that color to white.

Thank you for your time!

Post count: 23312

Hello DaveS,

If you want to change the background, you should use the code below and place it in Theme panel->Cusotm CSS Area.

The code is ->

.gr__grandecor_bg body {
background:white!important;
}

The result is here -> https://www.screencast.com/t/oUQ9nq3DLh5

Thanks for the message!

Post count: 200

Hi Catalin,

thanks for the prompt reply. Can I control the transparency myself? I’d like to see how it would look with a bit of transparency. For example the same % of transparency that is used in the original lightbox with black color.

Thank you for your time!

Post count: 23312

Hello DaveS,

Yes, you can make your own code for your desired color using the RGBa properly. For more information about this case, please check here -> https://css-tricks.com/rgba-browser-support/

Thanks for your understanding!

Post count: 200

Hey Catalin,

for some reason the suggested solution is not working.

I added the code to the custom CSS section in the theme panel, but the change is not visible. The lightbox still uses the default black color.

Could you please check?

Thanks

Post count: 22421

Hello,

The code provided above affects the attachment page, not the lightbox. You seem to have images that open in an attachment page and images that open in a lightbox as well.
For lightbox images use this code:
.mfp-bg {
background:white!important;
}

Thank you!

Post count: 200

Thanks, Bogdan, that works. But I’m losing the numbers under the images in the lightbox (1 of …), the navigation arrows and the closing X. How to change them to black?

Post count: 20688

Hi,

You can try the following code to make the close and prev/next another color – https://www.screencast.com/t/hUgsjfvcHp but I do not see any problem with the counter on the images.

.mfp-close,
.mfp-arrow-left:before,
.mfp-arrow-right:before {
color:black!important;
}

Thanks

Viewing 10 posts - 1 through 10 (of 10 total)
The forum ‘Newspaper’ is closed to new topics and replies.