WordPress.org

Ready to get started?Download WordPress

Forums

P2
Image caption padding (11 posts)

  1. ilushkin
    Member
    Posted 11 months ago #

    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

  2. James Richman UK
    Member
    Posted 11 months ago #

    Have you managed to solve this mate?

  3. ilushkin
    Member
    Posted 11 months ago #

    Have you managed to solve this mate?

    nope... did to get a chance to look at it yet...

  4. afzaal1985
    Member
    Posted 11 months ago #

    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

  5. 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

    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.

  6. ilushkin
    Member
    Posted 11 months ago #

    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;
    }

  7. afzaal1985
    Member
    Posted 11 months ago #

    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

    If it's setup correct then try adding the following to your child theme css:

    .wp-caption {
    text-align: left;
    }

    Afzaal

  8. ilushkin
    Member
    Posted 11 months ago #

    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
    Description: Child theme for the P2 theme
    Author: Ilya Vishnyakov
    Author URI: http://crazyfacts.com/
    Template: p2
    Version: 0.1.0
    */

  9. 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.

  10. ilushkin
    Member
    Posted 11 months ago #

    That's not a child theme.

    I'm sorry that's Child theme. Just WP Super Cache plugin is on. I will disable it.

  11. That would explain why we're not seeing the updates...

    Try clearing the cache before you deactivate that plugin as a just in case.

Reply

You must log in to post.

About this Theme

About this Topic