Change Image Caption font and color without CSS upgrade

  • Author
    Posts
  • #659632

    auxclass
    Member

    Is it possible to change the font color and size on some image captions with inline CSS or without buying the CSS upgrade?

    This is the CSS that gives the desired effect:
    .wp-caption p.wp-caption-text {
    color: #000000;
    font-size: 14px;
    margin: 5px;
    }

    This is one of the Posts:
    http://captnmike.com/2011/07/17/is-this-your-fender/

    Can I make the changes in the Post editor? I tried pasting in the CSS code above and the code appeared in the Post.

    Thanks

    The blog I need help with is captnmike.com.

    #659834

    You cannot alter the caption code directly, because it’s a shortcode. But you can, if you replace it with the actual code of the captioned image. For example, where your post editor has this:
    [caption id="etc. etc. etc." />[/caption]
    the sourcecode of your page has this:
    <div class="wp-caption etc. etc. etc. etc. etc. <p class="wp-caption-text">A &quot;found fender&quot; we picked out of the water in Puget Sound</p></div>
    So you can publish the post with a regular captioned image, then select View Source from your browser’s view menu, copy the image code, paste it in place of the original caption shortcode, and change this part:
    <p class="wp-caption-text">
    to this:
    <p style="font-size:115%;color:#000;margin:5px;" class="wp-caption-text">

    #659844

    auxclass
    Member

    I had to read your instructions a few times before they sunk in to change everything for the image, but I have the changes working on a test Post

    Thank you very much –

The topic ‘Change Image Caption font and color without CSS upgrade’ is closed to new replies.