• I have been playing with this for nearly 3 hours now.

    For the life of me I cannot get images in my post to center, they always align left no matter what. Text will center but not images.

    I have read countless other people with similar issues and tried every solution posted with no luck. I played with HTML code for hours and edited the CSS file. This seems to be a common problem apparently given the large number of people I have seen reporting the same problem.

    I’ve gotten the images to center using the DIV center tags, but as soon as I hyperlink the image it immediately reverts back to left alignment.

    I am using the wordpress review theme. Please any help is appreciated.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Could you post a link to the site in question?

    Thread Starter carp104

    (@carp104)

    I know I’ll probably get flamed for this, but Im just going to post my entire CSS code here…as I think that would be much more help than my URL.

    Here it is:

    [CSS moderated as per the Forum Rules. Please just post a link to your site.]

    Without the benefit of knowing what theme you are using, or being able to look at your live site, and on the off chance that you are using a theme that does not employ these: WordPress Generated Classes

    Simply adding that to the bottom of your style sheet can sometimes solve a lot of issues.

    [edit] whoops! my bad… “wordpress review theme” Never-mind.

    Thread Starter carp104

    (@carp104)

    Unfortunately as with all the other CSS modifications I’ve attempted, this one failed to solve the issue as well.

    Also, If I add any type of centering code around my hyperlinked image, as soon as I hit update the code I just added instantly disappears.

    I am using the WordPress Review Theme as stated in my original post.

    The only solution that came remotely close to solving this was changing

    div.post a img

    {float: left;
    margin-right: 10px;
    border: none;}

    to float: center; – however this then aligns all images on my site to the center and I only want a certain image in my post in the center.

    Site url?

    Just post a link to your site, we can see you css from there.

    Did you choose alignment center when uploading the images?

    I don’t think float:center is a valid property/attribute. A link to your site may be needed.

    Thread Starter carp104

    (@carp104)

    Here is link:

    http://www.airpurifier-ratings.info/blueair-601-air-purifier-review/

    I want to add a “buy now” button (image) at the bottom in place of where the text “buy from amazon” is. Unfortunately the image will not center like the text.

    carp104,

    Pass along a site link and we can clear this up right away and I’ve never heard of float:center either 🙂

    div.post a img {
    border: medium none;
    float: left;
    margin-right: 10px;
    }

    That floats the image left by default.

    I think this should place the image in the center.

    <p style="text-align: center;"><a target="_blank" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.amazon.com');" href="http://www.amazon.com/gp/product/B0002EXDQW?ie=UTF8&tag=moleremo-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B0002EXDQW"><img style="float:none;" alt="Buy from Amazon.com"  title="Your Title Here" src= "http://www.airpurifier-ratings.info/path_to_your_image/imagename.jpg" /></a></p>

    I think…

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Images will not center’ is closed to new replies.