WordPress.org

Ready to get started?Download WordPress

Forums

Image Width Issue with Caption Feature (1 post)

  1. alvaradopau
    Member
    Posted 1 year ago #

    Hi everyone, I've been trying to get rid of some space that gets added to image margins when adding a caption. I read these two posts on the forum and some other fixes online but nothing has worked for me (I deleted the value on the media.php file, installed the fix margin plugin offered in one of mentioned threads, and tried a bunch of CSS, nothing).

    In my case the image is resized from 560 to 553, not a huge deal but it gets displaced to the right, throwing the design off. You can see a captioned image here, the difference can be seen when comparing the first image to the second.

    I really don't know what to do. Here are the latest CSS rules I've tried:

    #attachment .wp-caption img {
    width: auto !important;
    padding: 0px;
    margin: 0px;
    }
    
    .wp-caption img {
    width: auto !important;
    margin: 0px;
    padding: 0px;
    border: none;
    }

    Really appreciate any tips or help.

Topic Closed

This topic has been closed to new replies.

About this Topic