• For some reason, I can’t seem to get any padding on my captioned images in my posts. I have the following code in style.css

    img.alignright {float:right; padding: 4px; margin: 0 0 0 4px; display: inline;}

    img.alignleft {float:left; padding: 4px; margin: 0 4px 0 0; display: inline;}

    img.aligncenter {display: block; margin-left: auto; margin-right: auto}

    a img.alignright {float:right; padding: 4px; margin: 0 0 0 10px; display: inline;}

    a img.alignleft {float:left; padding: 4px; margin: 0 4px 2px 0; display: inline;}

    a img.aligncenter {display: block; margin-left: auto; margin-right: auto}

    so whenever there ISN’T a caption it works exactly how i want it to. Yet when I add a caption and I designate the image as whatever it should be (alignright, alignleft) the text in my article completely ignores the padding. I check it with firebug, the browser sees the padding, the text just ignores it.

    I thought maybe if I manipulated the caption css:

    .wp-caption-text {
    vertical-align:top;
    text-align:center;
    font-style:italic;
    font-size:12px;
    padding: 0 0 2px 3px;

    but that didn’t seem to fix anything.

    Does anyone know how to fix this issue? Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Unless you provide a link to a page demonstrating the problem, no one will be able to offer much in the way of specific help.

    Thread Starter ihavereverb

    (@ihavereverb)

    O sorry about that, I was trying not to post anything with the problem until I fixed it, but if that makes it easier:

    http://brainofmatter.com/?p=263

    ihavereverb,

    I’m not seeing the img tag with a class at all. Are you working on the site right now?

    Thread Starter ihavereverb

    (@ihavereverb)

    Sorry about that. I had been working on the problem and didn’t tag every photo, just one. They’re all tagged correctly now and as you can see… nothing has changed. I really have no clue where to go from here to fix the problem.

    ihavereverb,

    Instead of adding the padding to the image tag, add it to the surrounding div of ‘.alignright’ on line 991 of style.css.

    .alignright {
       float: right;
       padding: 30px; /* set to 30px to see effect */
    }
Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Image Padding’ is closed to new replies.