Title: Alignment in Post
Last modified: March 8, 2019

---

# Alignment in Post

 *  Resolved [starwag](https://wordpress.org/support/users/starwag/)
 * (@starwag)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/alignment-in-post/)
 * When I place images in posts, the alignment tool won’t work. All images remain
   aligned left. I know this is a common problem, and I’ve already checked this 
   problem out on other similar support questions. The following code seems to be
   the preferred fix, but I have tried this both in tandem with the code I already
   have for images, and without my code, using only the code below alone to style
   images, and neither way seems to work.
 * This may be a fix for other people, but not for me. Does anyone have any other
   suggestions how to fix this? (the page I linked has a bottom image that should
   be center aligned, but isn’t).
 * The code I previously tried to fix this problem with.
 *     ```
       .wp-block-image .aligncenter, .wp-block-image .alignleft, .wp-block-image .alignright, .wp-block-image.is-resized {
       display: block;
       text-align:center!important;
       }
       ```
   
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Falignment-in-post%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [Joy](https://wordpress.org/support/users/joyously/)
 * (@joyously)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/alignment-in-post/#post-11292039)
 * I think you have bigger issues than image alignment. I couldn’t even tell what
   image you were referring to. Perhaps you should ask in your theme’s support forum.
   
   Here is what I saw:
 *  Thread Starter [starwag](https://wordpress.org/support/users/starwag/)
 * (@starwag)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/alignment-in-post/#post-11292324)
 * Does anyone have anything helpful to add to the question I asked?
    -  This reply was modified 7 years, 3 months ago by [starwag](https://wordpress.org/support/users/starwag/).
 *  [rodrigovaleriano](https://wordpress.org/support/users/rodrigovaleriano/)
 * (@rodrigovaleriano)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/alignment-in-post/#post-11292508)
 * Hello
    Try to use the following code:
 *     ```
       .wp-block-image .aligncenter, .wp-block-image .alignleft, .wp-block-image .alignright, .wp-block-image.is-resized {
       display: block;
       Width:100%; /*exemple*/
       margin: 0 auto !important;
       }
       ```
   
 * [link removed]
 * Thanks
    -  This reply was modified 7 years, 3 months ago by [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/).
 *  Thread Starter [starwag](https://wordpress.org/support/users/starwag/)
 * (@starwag)
 * [7 years ago](https://wordpress.org/support/topic/alignment-in-post/#post-11596096)
 * Thanks for trying to help, but I discovered I was missing some essential CSS 
   that works with WordPress. For anyone else out there who has similar issues, 
   and is working on their developer skills, the code below is what you absolutely
   need in your theme’s stylesheet for images to work. Rookie mistake, but definitely
   available in WordPress’s Codex, which includes lots of other essential info. 
   It took a bit more digging. You can find the codex here [WP Codex](https://codex.wordpress.org)
   I hope this saves someone else some time.
 *     ```
       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}
       a img.alignright {float:right; margin:0 0 1em 1em}
       a img.alignleft {float:left; margin:0 1em 1em 0}
       a img.aligncenter {display: block; margin-left: auto; margin-right: auto}
       ```
   

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

The topic ‘Alignment in Post’ is closed to new replies.

## Tags

 * [alignment](https://wordpress.org/support/topic-tag/alignment/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [images](https://wordpress.org/support/topic-tag/images/)
 * [posts](https://wordpress.org/support/topic-tag/posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [starwag](https://wordpress.org/support/users/starwag/)
 * Last activity: [7 years ago](https://wordpress.org/support/topic/alignment-in-post/#post-11596096)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
