Title: Image Padding
Last modified: August 19, 2016

---

# Image Padding

 *  [ihavereverb](https://wordpress.org/support/users/ihavereverb/)
 * (@ihavereverb)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/)
 * 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)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/#post-1588824)
 * 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](https://wordpress.org/support/users/ihavereverb/)
 * (@ihavereverb)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/#post-1588841)
 * 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](http://brainofmatter.com/?p=263)
 *  [doc4](https://wordpress.org/support/users/doc4/)
 * (@doc4)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/#post-1588905)
 * ihavereverb,
 * I’m not seeing the img tag with a class at all. Are you working on the site right
   now?
 *  Thread Starter [ihavereverb](https://wordpress.org/support/users/ihavereverb/)
 * (@ihavereverb)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/#post-1588982)
 * 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.
 *  [doc4](https://wordpress.org/support/users/doc4/)
 * (@doc4)
 * [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/#post-1589079)
 * 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.

## Tags

 * [caption](https://wordpress.org/support/topic-tag/caption/)
 * [image](https://wordpress.org/support/topic-tag/image/)
 * [padding](https://wordpress.org/support/topic-tag/padding/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 3 participants
 * Last reply from: [doc4](https://wordpress.org/support/users/doc4/)
 * Last activity: [15 years, 9 months ago](https://wordpress.org/support/topic/image-padding-1/#post-1589079)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
