Forums

Centered photos in the editor are aligned left in the blog (5 posts)

  1. ghbrodbeck
    Member
    Posted 2 years ago #

    Hi,
    I've added some photos (with captions) to my about page and centered them in the editor, but when I view the site, the photos & captions are aligned left.
    What do I need to do to fix that? I'm a html greenie.
    Also, at one stage I did not use captions but typed centered text under each photo, but that looked even worse, with the text being all over the place on the site. (half wrapped)
    Any help would be much appreciated.
    thanks
    George B

  2. lhoylhoy
    Member
    Posted 2 years ago #

    paste your link here so i can see it

  3. ghbrodbeck
    Member
    Posted 2 years ago #

    Hi lhoylhoy,
    thanks for that. My blog address is:
    http://www.musicandmarketingtips.com
    The problem is in the "about" page
    Cheers
    George B

  4. brandonros
    Member
    Posted 2 years ago #

    George,
    I'm having the same problem you were. I was afraid it was a theme problem. I looked at your page and it looks like you got the problem solved. What did you end up doing to fix it?
    Thanks,
    Brandon

  5. thatruth2006
    Member
    Posted 2 years ago #

    Figured out what he did, I had the same problem. It requires that a bit of code be inside of your style.css file.
    http://codex.wordpress.org/CSS

    The code snippet should just be dropped in your style.css file and you should be good to go.

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

    .alignleft {
    float: left;
    }

    .alignright {
    float: right;
    }

    .wp-caption {
    border: 1px solid #ddd;
    text-align: center;
    background-color: #f3f3f3;
    padding-top: 4px;
    margin: 10px;
    /* optional rounded corners for browsers that support it */
    -moz-border-radius: 3px;
    -khtml-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    }

    .wp-caption img {
    margin: 0;
    padding: 0;
    border: 0 none;
    }

    .wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    padding: 0 4px 5px;
    margin: 0;
    }

    Hope this helps.

Topic Closed

This topic has been closed to new replies.

About this Topic