Title: image styling problem
Last modified: August 19, 2016

---

# image styling problem

 *  Resolved [bricksmith](https://wordpress.org/support/users/bricksmith/)
 * (@bricksmith)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-styling-problem/)
 * I’m having problems with styling of images.
 * The css for my theme specifies that images should be styled float: right.
 * However, I thought that I would be able to override that simply by specifying
   a different position (ex: left) when inserting an image into a post using the
   image editor. So far, it’s not working. Any ideas?

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

 *  [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-813780)
 * Can you provide us a link?
 * Keep in mind that when you specify position using the media gallery while placing
   an image, it just adds a CSS class to the image. You’ll need to edit your CSS
   to tell the browser how to position imagery with these classes.
 * Make sense?
 *  Thread Starter [bricksmith](https://wordpress.org/support/users/bricksmith/)
 * (@bricksmith)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-814053)
 * I think I get what you are saying, sewmyheadon. I’ll check further into that.
   Here’s a link to the blog:
 * [http://28nineteen.com/](http://28nineteen.com/)
 *  [Eric Amundson](https://wordpress.org/support/users/sewmyheadon/)
 * (@sewmyheadon)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-814066)
 * Right now, you have a generic definition for all images in your posts:
 *     ```
       div.post img, div.page img { float: right; padding: 5px; }
       ```
   
 * This is causing all images to float right. If you’d like to be able to use the
   position selector through the Media Gallery, it will add classes to your image
   and you can add the following CSS in your style.css file to override these positions:
 *     ```
       div.post img.alignleft {float:left;}
       div.post img.alignright {float:right;}
       ```
   
 *  [xinxin](https://wordpress.org/support/users/xinxin/)
 * (@xinxin)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-814073)
 * Thanks, sewmyheadon – this helped me in one of my sites.
 *  Thread Starter [bricksmith](https://wordpress.org/support/users/bricksmith/)
 * (@bricksmith)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-814080)
 * Thanks so much!
 * I left the generic definition in place so my existing posts would not be messed
   up and added the .alignleft and .alignright. That seemed to do the trick.
 * Thanks!
 *  [optimisticfriend](https://wordpress.org/support/users/optimisticfriend/)
 * (@optimisticfriend)
 * [17 years, 5 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-814237)
 * Thanks! It worked for me as well after I slightly modified the code to match 
   the theme css, which is using “contentleft” instead of “post.”
    #contentleft 
   p img.alignleft {float:left;} #contentleft p img.alignright {float:right;}

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

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 4 participants
 * Last reply from: [optimisticfriend](https://wordpress.org/support/users/optimisticfriend/)
 * Last activity: [17 years, 5 months ago](https://wordpress.org/support/topic/image-styling-problem/#post-814237)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
