Title: Image Alignment
Last modified: April 8, 2020

---

# Image Alignment

 *  [stocktondenos](https://wordpress.org/support/users/stocktondenos/)
 * (@stocktondenos)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/)
 * When I upload an image onto my site it will only align left. I can click on the
   block editor and choose center align or right align and it looks fine in the 
   editor. However, when I go to my site page all the images align left no matter
   what I set them to. I have done many searches online and have copied and pasted
   many CSS codes onto my site to try and fix it but nothing has worked so far. 
   Any help on this will be greatly appreciated.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fimage-alignment-46%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  [potentdevelopment](https://wordpress.org/support/users/potentdevelopment/)
 * (@potentdevelopment)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/#post-12643291)
 * Its because of your CSS here:
 *     ```
       .blog-alternate-small #primary article:nth-child(odd) figure {
           float: left;
           padding-right: 4%;
       }
       ```
   
 * The CSS above is overriding your class .alignright.
 *  Thread Starter [stocktondenos](https://wordpress.org/support/users/stocktondenos/)
 * (@stocktondenos)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/#post-12643418)
 * I see. Do you happen to know how to fix it? Is their a way to delete that CSS?
 *  [potentdevelopment](https://wordpress.org/support/users/potentdevelopment/)
 * (@potentdevelopment)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/#post-12643452)
 * [https://utahrunningcoach.com/wp-content/themes/accelerate/style.css](https://utahrunningcoach.com/wp-content/themes/accelerate/style.css)
   
   It is in your main theme stylesheet.
 * Try commenting out the float like in the sample below.
 *     ```
       .blog-alternate-small #primary article:nth-child(odd) figure {
           /* float: left; */
           padding-right: 4%;
       }
       ```
   
 *  Thread Starter [stocktondenos](https://wordpress.org/support/users/stocktondenos/)
 * (@stocktondenos)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/#post-12646005)
 * I actually got it to work with
 * .wp-block-image .alignright { float: right !important; }
 * But that only helps with the images that I choose to align right. I tried the
   following for images aligned center but it did not work
 * .wp-block-image .aligncenter { float: center !important; }
 * Any ideas?
 *  [potentdevelopment](https://wordpress.org/support/users/potentdevelopment/)
 * (@potentdevelopment)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/#post-12648335)
 * You do not float center. There is no such thing. float: none; display: block;
   text-align: center;

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

The topic ‘Image Alignment’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [potentdevelopment](https://wordpress.org/support/users/potentdevelopment/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/image-alignment-46/#post-12648335)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
