Title: Another image aligning problem
Last modified: August 18, 2016

---

# Another image aligning problem

 *  [lilypetals](https://wordpress.org/support/users/lilypetals/)
 * (@lilypetals)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/)
 * I can’t get the image to stay in the center of the post, regardless of size. 
   It always ends up shifting to the right, doesn’t matter if I choose “center” 
   or not in the post/write/text box. The ONLY way for it to stay in the center 
   is to make the image the exact pixel which is 470 wide. But it’s not possible
   to make ALL my images that size; sometimes I’ll have to post a picture smaller
   than 470 wide. If it’s smaller than that, it’ll shift to the right, and when 
   you click into the permalink, the picture will pop out vertically of the text
   box altogether. Hmph.
 * Well regardless of pixel size, is there a code I can place in either those php
   or css files to fix this?
 * Thanks!
 * PS. Check my blog, the latest post:
    [http://www.niquehappy.com/blog/](http://www.niquehappy.com/blog/)
 * Click into the first post, you’ll see what I mean.

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

 *  [koeln](https://wordpress.org/support/users/koeln/)
 * (@koeln)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479590)
 * You can use margin in your stylesheet. Set margin to auto:
 * margin: 0px auto;
 *  Thread Starter [lilypetals](https://wordpress.org/support/users/lilypetals/)
 * (@lilypetals)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479591)
 * sorry i’m not very HTML-friendly, could you specify which margin you’re talking
   about? under what line? there’s more than one instance of “margin”.
 * ————
 *  Thread Starter [lilypetals](https://wordpress.org/support/users/lilypetals/)
 * (@lilypetals)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479597)
 * fyi – i had to resize the image, that’s why it fit the way it does now.
 * but i’m still having that problem..
 *  [koeln](https://wordpress.org/support/users/koeln/)
 * (@koeln)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479599)
 * try
    [img src=”xyz” style=”margin: 0px auto;”]
 *  Thread Starter [lilypetals](https://wordpress.org/support/users/lilypetals/)
 * (@lilypetals)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479661)
 * No good. But that would just mean I’d have to adjust that EVERY time I start 
   a new post. I’m looking for a universal way to fix it. Thanks.
 *  [koeln](https://wordpress.org/support/users/koeln/)
 * (@koeln)
 * [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479674)
 * Nooo, the margin is done automatically by the browser (auto)

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

The topic ‘Another image aligning problem’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 6 replies
 * 2 participants
 * Last reply from: [koeln](https://wordpress.org/support/users/koeln/)
 * Last activity: [19 years, 6 months ago](https://wordpress.org/support/topic/another-image-aligning-problem/#post-479674)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
