• I have a self-hosted wordpress blog and the latest post I created – I included 4 pictures that I wanted centered. No matter what I do – they do not place where I’ve told them to go. I have initially set them to be centered. I have gone back in, selected the photo in order to click the edit button – make sure they’re centered, to them only being flush left and with no border as you see in the editor.

    I have disabled all my plugins (which aren’t many) to see if that was causing the glitch but alas, no.

    I’m sadly frustrated and would love some help and guidance please! My site is:
    https://www.therecipehunter.com

    Thanks in advance.
    Pamela

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter spammie5

    (@spammie5)

    UPDATE: I just had the weirdest thing happen…I was posting a new blog with multiple photos that I would upload one by one as I typed my post. I decided to upload a few photos at once and then go back and add them into the body of the post. These images are in fact centered but have no captions while the rest of the images will not center. These are showing a paragraph code but something is wrong with the captions:

    <p style="text-align: center;"><a href="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_20931.jpg"><img class="aligncenter wp-image-93" alt="Jalape?os " src="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_20931-768x1024.jpg" width="461" height="614" /></a></p>

    While the pictures that I upload directly into the visual editor show this code which shows captions but won’t align center.

    [caption id="attachment_62" align="center" width="430"]<a href="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_1880.jpg"><img class=" wp-image-62 " alt="Harissa Fries from Carpe Diem Wine Bar, Napa, CA" src="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_1880-768x1024.jpg" width="430" height="573" /></a> Harissa Fries from Carpe Diem Wine Bar, Napa, CA[/caption]

    What’s causing the difference in the text editor? And how can I get my images centered AND with captions??? I hope someone can help me!

    Try this for the first image:
    <p style="text-align: center;"><a href="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_20931.jpg"><img class="wp-image-93 alignnone" alt="Jalape?os " src="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_20931-768x1024.jpg" width="461" height="614" /></a></p>

    Try this for the second image:
    [caption id="attachment_62" align="aligncenter" width="430"]<a href="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_1880.jpg"><img class=" wp-image-62 " alt="Harissa Fries from Carpe Diem Wine Bar, Napa, CA" src="https://www.therecipehunter.com/wp-content/uploads/2013/08/IMG_1880-768x1024.jpg" width="430" height="573" /></a> Harissa Fries from Carpe Diem Wine Bar, Napa, CA[/caption]

    Thread Starter spammie5

    (@spammie5)

    Thanks Krishna, but neither of those worked.

    I do have all plugins disabled and continue to cache as well.

    I found a CSS fix for the captions not displaying and it fixed them in the second oldest post but not the newest. I still can’t figure out why my pictures won’t center but 2 did in <p> style where as all the other photos I add start off with the [caption]….

    Strange! I posted the codes above only after testing on my test site (WP 3.6 and Twenty Thirteen theme) and they were centered and appeared as they should.

    Can you revert to Twenty Twelve (or 2013) theme and try those codes to see if they still won’t work (or work!)?

    Thread Starter spammie5

    (@spammie5)

    I hate to switch themes – I’m a newbie!

    But – I have the caption problem solved…I found code to go on the theme’s style.css that seems to have solved that problem.

    However, nothing will aligncenter…or align right either. Everything is flush left….but at least with the border and caption.

    Got a fix for that??? BTW – thank you for helping me. I’m much appreciative.

    Thread Starter spammie5

    (@spammie5)

    I found the solution! Apparently my theme didn’t have some proper code and I added this to the style.css and guess what? Everything is now centered!

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

    HUGE sigh of relief! Thank you Krishna for your help on this…I’m just glad I be moving forward now!

    Edit: Glad to note that you could resolve the issue. ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Pictures won't align no matter what!’ is closed to new replies.