Need help? Check out our Support site, then


Quick fix for the annoying caption hyphen in Twentyeleven theme

  1. lordoftheshrine
    Member

    Hi,
    Reading through the forums i did not see an easy fix given for removing the hyphen that appears before the text in picture captions.
    Here's what I did that removed it:

    In style.css look for:
    }
    .wp-caption .wp-caption-text:before {
    color: #666;
    content:' \2014';
    font-size: 14px;
    font-style: normal;
    font-weight: bold;
    margin-right: 5px;
    position: absolute;
    left: 0px;
    top: 7px;

    Simply remove the \2014 (special character code) from the content line. They haven't shown up since.
    Please be careful when modifying anything in WordPress so you don't F-up your blog, obviously i have just given my fix and cannot be held responsible...blah, blah
    Happy Blogging!

  2. Are you referring to a wordpress.com site or a wp.ORG site?

    Also, is there a significant difference with this "dashed caption" problem between the CSS of wp.COM and wp.ORG?

  3. lordoftheshrine
    Member

    Ooooh sorry for any confusion, I have all my blogs on my own hosting so I guess it would be the 'standalone' WordPress that you install onto your server.
    Sorry if I posted in the totally wrong place, I came across this forum googling for the hyphen fix.

  4. Thank you for answering.

    I don't know much about CSS so I don't know if your solution will work with our wp.com version of the theme. So if another volunteer knows, please jump in to say whether this is useful here or not.

  5. First, if you only remove the special character code, the caption will remain in its original positioning, which doesn't make sense without the hyphen: you also need to change the horizontal positioning of the caption text (if I hid the stupid hyphen I'd make the text centered).
    Second, things don't work that way on wordpress.com: you don't modify the original stylesheet, you add your changes in the CSS editor. To remove the hyphen and center the caption, you'd add this:

    .wp-caption .wp-caption-text:before {
        display:none;
    }
    .wp-caption .wp-caption-text {
        text-align:center;
        padding:5px 7px 0;
    }
  6. ~~thanks panos

  7. lordoftheshrine
    Member

    Yea, I had to change the horizontal spacing too. Thanks for the input everyone.

Topic Closed

This topic has been closed to new replies.

About this Topic