• Hey my blog is atrilli.net

    whenever I try to center an image (using google chrome) for some reason it still stays to the left. However, when I use Firefox it always works. This is a problem because Chrome is my default browser.

    Also you should know, the codes appear differently when I use the different browsers. When I’m on chrome, the center code says <img class="aligncenter" src="CenteredContentHere" alt="" />

    And when I use firefox the code is
    <p style="text-align: center;"><img src="CenteredContentHere" alt="" /></p>

    Keep in mind the firefox code always works, so is there a way to get the FF code into Chrome? Or any kind of way to make my posts centered using Chrome?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Try adding this to css:

    img { display: inline-block; }

    Thread Starter bucktrice

    (@bucktrice)

    That didnt work, thanks though.

    i see all images on the front page centered (up-to-date chrome browser)

    try to clear you browser cache by pressing ‘CTRL F5’

    Thread Starter bucktrice

    (@bucktrice)

    the posts that you see centered are the ones i did in firefox, and some of them are just images that fit perfectly

    i havent centered anything with chrome ever

    Edit image and select center alignment, WP will add aligncenter class to your image.

    Add following to your CSS markup:

    .alignleft{display:inline; float:left; margin:0 1em 1em 0;}
    .alignright{display:inline; float:right; margin:0 0 1em 1em;}
    .aligncenter{clear:both; display:block; margin-left:auto; margin-right:auto;}

    Thread Starter bucktrice

    (@bucktrice)

    that doesnt work either

    It will if you remove margin from D class you or one of your plugins applies to the images. You could override values by adding !important to margin-left, margin-right, but it’s not generally recommended.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Post Content/Images won't center’ is closed to new replies.