WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Changing the font/colour of image captions (4 posts)

  1. obscure
    Member
    Posted 2 years ago #

    I would like to change the font type/colour of text used for image captions. I am not sure if this is controlled by WP itself of the theme (I am using Photocrati).

    Photocrati allows the user to add custom CSS to customise the site in ways not already provided for by the theme. I have already altered the border type and width around images by adding the following...

    .post img, .post a img { border:2px solid #8ca644; padding:1; margin:0; background:#555; }

    and would now like to add to this by altering the font. can anyone advise the best way to do this please.

  2. Kumar
    Member
    Posted 2 years ago #

    In your style.css of your theme folder.
    .wp-caption {
    border: 1px solid #ddd;
    text-align: center;
    background-color: #000000;
    color:#ffffff;// Edit your choice of color with the relevant hexadecimal value.
    padding-top: 4px;
    margin: 10px;
    }

  3. Kumar
    Member
    Posted 2 years ago #

    If you want both your font and color to be customized try this code .wp-caption {
    border: 1px solid #ddd;
    font : 13px
    text-align: center;
    background-color: #000000;
    font:30px "Helvetica Neue", Helvetica, Arial, sans-serif; // Edit the font with your choice but make sure the font is installed on to the directory.
    color:#ffffff;// Edit your choice of color with the relevant hexadecimal value.
    padding-top: 4px;
    margin: 10px;
    }

  4. obscure
    Member
    Posted 2 years ago #

    Thanks for that. All sorted.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.