Change the colour of the background of an image

  • Author
  • #2694261

    I am using Retro-fitted theme. Because of the theme colour of the background of the image, the caption of the photo is not easily readable. I just want the background to be black so that Caption is visible clearly. What is the css code? Please help.

    The blog I need help with is



    Hi there!

    You can change the colour of the caption’s text to white by adding the following to the CSS panel of the Customizer:

    .wp-caption-text {
        color: #fff;

    In addition, if you’d like to change the background colour of the caption area, then you could use the following CSS:

    div.wp-caption {
        background-color: #be4702;

    You can change the value of #be4702 to any HEX code of your choice. If you’d like to experiment with different colours, try a few Google searches to get a list of HEX codes and their corresponding values. Here’s an example of a site that I’ve used before:

    Hope that’s helpful! We’re right here if extra questions come up too.


    Indeed thanks a lot @siobhyb!
    Done! Will look for the hex colour code suitably.
    God bless!



    You’re most welcome!


    Here is one “extra question” please!
    In my slideshows, the caption text just merges with image colour in some photos. To avoid that, is it possible to lay a transparent different colour bar so that the text which is inlaid the bar, is clearly visible?



    Can you point me to an example post/image where I can see what you’re referring to? I’ll be able to help from there.


    The reference was a Slideshow in this post:
    While waiting for a solution, I clicked the Support and one staff by name Mr Dragos B came online and sorted out the matter. He suggested a CSS code which he himself added into the theme.
    So my problem stands resolved.
    Thanks to every one of the Staff of WP.
    Excellent service!



    Perfect! :) If you have any extra questions then please don’t hesitate to get back in touch either via live chat or, if your question is concerning CSS, our dedicated forum here:

The topic ‘Change the colour of the background of an image’ is closed to new replies.