WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to Remove Extra Grey Space below Caption Under Image (9 posts)

  1. jimii
    Member
    Posted 1 year ago #

    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

  2. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    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.

  3. jimii
    Member
    Posted 1 year ago #

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

  4. jimii
    Member
    Posted 1 year ago #

    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

  5. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Excellent - try adding this to your CSS:

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

    Adjust margin if needed.

  6. Andrew
    Forum Moderator
    Posted 1 year ago #

    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.

  7. jimii
    Member
    Posted 1 year ago #

    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

  8. Jayne
    Member
    Posted 4 months ago #

    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 */
    }'

  9. Jayne
    Member
    Posted 4 months ago #

    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 */
    }

Topic Closed

This topic has been closed to new replies.

About this Topic