change caption font size

  • Unknown's avatar

    Hello, I’m using the pen scratch theme, but the caption font size is so tiny I don’t think anyone can read it, I hardly can. If possible I’d like to center the caption under the picture as well. Is there something I can copy/paste into the CSS editing tool (there’s nothing else there right now) that will increase the font size for captions just a little and center it under the photo?

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hello!

    I was able to increase the size of your captions with the following CSS Code:

    b, strong {
        font-size: 20px;
        font-weight: bold;
    }

    See here: http://pbrd.co/1Af403k

    To center the captions WordPress does that automattically. Can you confirm that you have attemped to center caption by using
    Dashboard–>Media–>Select Picture in Question
    Locate the caption box and edit it with your info
    See here: http://pbrd.co/1Af44jB

    By doing so it should center like this: http://pbrd.co/1Af4u9C

    And be displayed like this on your site:

    11 Ways NOT to write a WordPress Plugin

  • Unknown's avatar

    I took a look at http://allfourparts.com/ and I noticed that you are using regular paragraphs instead of captions for all of your recent photos. Are you doing that to get around the problem instead of using CSS?

    I setup a test blog and added an image with a caption to it on the Penscratch theme. This CSS will adjust the caption text so it is larger and centered:

    .wp-caption-text {
    	font-size: 120%;
    	text-align: center;
    }

    You should add that example to your Appearance > Customize > CSS editor.

    Adjust the !20% number as needed.

    If you need help with the captions part separately, just reply back here and let me know.

  • Unknown's avatar

    Thank you so much! I was able to get the caption text centered, but it’s still the same size…

  • Unknown's avatar

    Let’s take a closer look at a specific example. Here is a link to one of your recent posts:
    http://allfourparts.com/2014/11/25/843/

    In that post, the third image has the following text below it, “goat cheese and grilled vegetable terrine.”

    That text is actually inline text and not officially a caption. To make a caption, you would need to either add the caption at the time you insert the image or add it by clicking on the image and then filling out the caption field. Here is an example of what it looks like: https://cloudup.com/c0SBr11Ty-5

    If you are using the caption field, then you can make modifications to all captions at once using custom CSS like the example I provided earlier. However, if you are using inline text, such as what you did in the http://allfourparts.com/2014/11/25/843/ post, then you must edit each line of text individually in order to make a change to the size.

    A good thing to do at this point might be to spend a little time and try to get a better understanding of how to insert images and add captions through the settings instead of in the editor itself. You also might really like galleries (I love them), and one cool trick you can do is insert a gallery and then force it to go into one column. When images are in galleries, you can control how the captions appear by editing image settings in the media library. If you insert images directly, one at a time, then the caption will not be connected to the one in the media library but will use what was saved there as the default caption (if you added a caption in the media library before).

    Once you get the hang of it, everything will start to click a bit better, creating posts with images or galleries should get better, and then making modifications with CSS will work better if you have inserted the images using the settings provided instead of just making a paragraph of text below the image in the editor. Hopefully I’m explaining the differences well enough! One thing you might do is try making a draft and insert an image and an image with a caption and a gallery so that you can better understand how those different things work.
    http://en.support.wordpress.com/images/gallery/

  • Unknown's avatar

    Thanks again for all the help. Yes in some old posts I just centered the paragraph text to get around this problem. If you take a look at the projet café tab (null) I’ve used the caption feature. It is centered, but still extremely small. Can this be fixed?

  • Unknown's avatar

    Hi, to enlarge the caption text under images, add the following CSS and then adjust the 0.715em value as desired.

    .wf-active .wp-caption-text {
        font-size: 0.715em;
    }
  • The topic ‘change caption font size’ is closed to new replies.