Support » Fixing WordPress » How to Remove Extra Grey Space below Caption Under Image

  • Resolved jimii

    (@jimii)


    I use Twenty Ten with child theme.

    When posting images on pages and utilizing the caption below the image, extra grey fill appears below the last line used in the caption.

    I’ve reviewed codex and searched other forums without success to identify the location of the source code that controls this extra space (including firebug). It appears to be an extra line or two and since the height if the image varies – I am guessing the code is somehow height plus caption plus ‘padding / extra line’…

    If someone can point me in the right direction I’d really appreciate it. Thank you. jim

Viewing 8 replies - 1 through 8 (of 8 total)
  • Can you post a link to your site? It’s near impossible to help with CSS questions without looking at the actual page – as every site can be different.

    its a development site for a site in redesign – is there a simple way to post the link without it remaining public here?

    WPyogi,
    I set up a spare domain – here’s a simple sample page which shows the spare grey area below the caption. Its almost as though the caption is spacing itself like an h1 tag… ?

    http://www.jestatest.com/simple/

    Any help appreciated. Jim

    Excellent – try adding this to your CSS:

    #content .wp-caption p.wp-caption-text {
        margin-bottom: 0;
    }

    Adjust margin if needed.

    Moderator Andrew Nevins

    (@anevins)

    Forum moderator

    Are you familiar with CSS margin?
    You need to set margin-bottom to zero;

    #content .wp-caption p.wp-caption-text {
     margin-bottom: 0;
    }

    Edit: Boo hoo.

    solved – thank you – I am familiar with it generally, but couldn’t source the code to make the change yesterday. I must have been looking right at it and just couldn’t pick it off the page. I’ve gone back now and its clear as day. Thank you both – resolved. jim

    Thank you WPyogi & Andrew

    I hate to think how much time I spent trying to fix this problem even using FireBug. I ended up setting the margin to 5px to balance the space above/below the picture text

    ‘#content .wp-caption p.wp-caption-text {
    margin-bottom: 5px; /* Sets the space below picture text */
    }’

    Thank you WPyogi & Andrew

    I hate to think how much time I spent trying to fix this problem even using FireBug. I ended up setting the margin to 5px to balance the space above/below the picture text

    #content .wp-caption p.wp-caption-text {
    margin-bottom: 5px; /* Sets the space below picture text */
    }

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘How to Remove Extra Grey Space below Caption Under Image’ is closed to new replies.