Change the colour of the background of an image

  • Author
    Posts
  • #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 vimokshananda.com.

    #2694346

    siobhyb
    Staff

    Hi there!

    You can change the colour of the caption’s text to white by adding the following to the CSS panel of the WordPress.com 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:

    http://www.color-hex.com/

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

    #2694349

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

    #2694351

    siobhyb
    Staff

    You’re most welcome!

    #2694352

    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?
    Thanks!

    #2694356

    siobhyb
    Staff

    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.

    #2694359

    The reference was a Slideshow in this post:
    https://vimokshananda.com/2016/07/20/holy-mother-as-a-guru/
    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!

    #2694360

    siobhyb
    Staff

    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:

    https://en.forums.wordpress.com/forum/css-customization

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