Title: Image caption padding
Last modified: August 21, 2016

---

# Image caption padding

 *  [ilushkin](https://wordpress.org/support/users/ilushkin/)
 * (@ilushkin)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/)
 * Somehow adding image captions/descriptions radically moves images to the right.
 * Has to do something with the padding, i assume. Is anyone familiar with the theme
   can point out which css line to modify.
 * example:
 * [http://bit.ly/101NBrQ](http://bit.ly/101NBrQ)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [James Richman UK](https://wordpress.org/support/users/jamesrichmanuk/)
 * (@jamesrichmanuk)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708783)
 * Have you managed to solve this mate?
 *  Thread Starter [ilushkin](https://wordpress.org/support/users/ilushkin/)
 * (@ilushkin)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708851)
 * >  Have you managed to solve this mate?
 * nope… did to get a chance to look at it yet…
 *  [afzaal1985](https://wordpress.org/support/users/afzaal1985/)
 * (@afzaal1985)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708864)
 * A quick fix will move both the image and text back to the left hand side of the
   page. To do this go to line 1556 in the style.css file and remove the following
   line:
 *     ```
       text-align: center;
       ```
   
 * If you want the image to move left but the text to still be on the right then
   still remove the above line but then add it to line 1574. So now the code between
   1569 and 1574 should be:
 *     ```
       .wp-caption p.wp-caption-text {
       font-size: 11px;
       line-height: 17px;
       padding: 0 4px 5px;
       margin: 0;
       text-align: center;
       }
       ```
   
 * Let me know if you need anything else.
 * Afzaal
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708865)
 * Just chiming in: P2 is an active theme and may get updated. To ensure that your
   changes do not get lost you may want to create a child theme and make your CSS
   modifications there.
 * [http://codex.wordpress.org/Child_Themes](http://codex.wordpress.org/Child_Themes)
 * The directory on that website is using a different name then P2 but the `Theme
   Name:` tag has been left as is. If you want to make changes directly to P2’s `
   style.css` file like that then you may want to change the `Theme Name:` tag as
   well.
 *  Thread Starter [ilushkin](https://wordpress.org/support/users/ilushkin/)
 * (@ilushkin)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708868)
 * > A quick fix will move both the image and text back to the left hand side of
   > the page. To do this go to line 1556 in the style.css file and remove the following
   > line:
   > text-align: center;
   > If you want the image to move left but the text to still be on the right then
   > still remove the above line but then add it to line 1574. So now the code between
   > 1569 and 1574 should be:
   > .wp-caption p.wp-caption-text {
   >  font-size: 11px; line-height: 17px; padding:
   > 0 4px 5px; margin: 0; text-align: center; }
   > Let me know if you need anything else.
   > Afzaal
 * Weird but didn’t work.
 * That’s what I have in my child theme’s style.css
 * > .attachment #main .entry .attachment-image {
   >  margin: .7em 0;
   > }
   > .wp-caption p.wp-caption-text {
   >  font-size: 11px; line-height: 17px; padding:
   > 0 4px 5px; margin: 0; text-align: center; }
 *  [afzaal1985](https://wordpress.org/support/users/afzaal1985/)
 * (@afzaal1985)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708869)
 * Have you setup the childtheme correctly? Please re-check and make sure you import
   the original stylesheet from the main theme folder to the stylesheet in your 
   child folder. Take a look at the following for guidance:
 * [http://codex.wordpress.org/Child_Themes](http://codex.wordpress.org/Child_Themes)
 * If it’s setup correct then try adding the following to your child theme css:
 *     ```
       .wp-caption {
       text-align: left;
       }
       ```
   
 * Afzaal
 *  Thread Starter [ilushkin](https://wordpress.org/support/users/ilushkin/)
 * (@ilushkin)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708870)
 * > the Theme Name: tag has been left as is.
 * I’m sorry what do you mean by that mysterious tag? I have P2 Child theme as the
   name.
 * /*
    Theme Name: P2 Child Theme URI: [http://wordpress.org/extend/themes/p2](http://wordpress.org/extend/themes/p2)
   Description: Child theme for the P2 theme Author: Ilya Vishnyakov Author URI:
   [http://crazyfacts.com/](http://crazyfacts.com/) Template: p2 Version: 0.1.0 */
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708872)
 * Did you activate that child theme? This is what’s on that link you posted.
 *     ```
       /*
       Theme Name: P2
       Theme URI: http://p2theme.com/
       Author: Automattic
       Author URI: http://automattic.com/
       Version: 1.4.2
       License: GNU General Public License v2.0
       License URI: http://www.gnu.org/licenses/gpl-2.0.html
   
       This theme, like WordPress, is licensed under the GPL.
       Use it to make something cool, have fun, and share what you've learned with others.
       */
       ```
   
 * I’ve deleted the `Description` and `Tags` lines to make it more readable. That’s
   not a child theme.
 *  Thread Starter [ilushkin](https://wordpress.org/support/users/ilushkin/)
 * (@ilushkin)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708873)
 * > That’s not a child theme.
 * I’m sorry that’s Child theme. Just WP Super Cache plugin is on. I will disable
   it.
 *  Moderator [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * (@jdembowski)
 * Forum Moderator and Brute Squad
 * [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708874)
 * That would explain why we’re not seeing the updates…
 * Try clearing the cache before you deactivate that plugin as a just in case.

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘Image caption padding’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/p2/1.5.8/screenshot.png)
 * P2
 * [Support Threads](https://wordpress.org/support/theme/p2/)
 * [Active Topics](https://wordpress.org/support/theme/p2/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/p2/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/p2/reviews/)

## Tags

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

 * 10 replies
 * 4 participants
 * Last reply from: [Jan Dembowski](https://wordpress.org/support/users/jdembowski/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/image-caption-padding/#post-3708874)
 * Status: not resolved