• Resolved lt424

    (@lt424)


    I recently upgraded WordPress from version 2.3.1 to 2.9.2. One of the new features I noticed in the latest version is the CAPTION ID function.

    However, the first thing I noticed was that images, though centered correctly while creating the post, the image would align to the left when the post is published.

    I was able to correct the problem with images that are referenced by URL, by copying/pasting the required CSS code (WP-CAPTION etc) from one of the WordPress style sheets (can’t remember which one) into my custom style sheet. However, when adding attached images (from my computer), the images, though centered when editing the post, become left aligned when published.

    I would very much appreciate some guidance on what I need to do to fix this alignment problem.

    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • place a link to the site where you have problem. It will help others to better help you.

    Thread Starter lt424

    (@lt424)

    Thanks for asking. I wasn’t sure if posting links is against this forum’s rules.

    My website is FogCityJournal.com. The first post contains the attached image (incorrectly left-aligned), the third post contains URL referenced images (correctly centered).

    Thanks for looking into this for me.

    Try adding this to the bottom of your style sheet, and test the results:

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

    .alignleft {
    float: left;
    }

    .alignright {
    float: right;
    }

    Don’t do anything you can’t undo easily! 🙂

    Thread Starter lt424

    (@lt424)

    Works like a charm. Thanks so much, Clayton!!

    You’re welcome.

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

The topic ‘Attached images not centering’ is closed to new replies.