Title: css for IMG within posts
Last modified: August 19, 2016

---

# css for IMG within posts

 *  Resolved [pdlr](https://wordpress.org/support/users/pdlr/)
 * (@pdlr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/css-for-img-within-posts/)
 * I am wondering if there is a way to effect the css properties of the IMG tag 
   only within a post. I would like for the users to be able to upload a series 
   of images without having to set the border to 0 and the space around each image
   to 5 pixels; this can be very time-consuming when working with dozens of images.
 * I have tried different variations, but I always end up affecting all images on
   the entire site.
 * Thanks for any help.

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

 *  [Adam Brown](https://wordpress.org/support/users/adamrbrown/)
 * (@adamrbrown)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/css-for-img-within-posts/#post-666551)
 * Probably, but depends on your theme.
 * In my theme, I would do that with this CSS directive:
 * `.post img{border:none;margin:5px;}`
 * (.post is the div class that each post gets wrapped in.)
 *  Thread Starter [pdlr](https://wordpress.org/support/users/pdlr/)
 * (@pdlr)
 * [18 years, 6 months ago](https://wordpress.org/support/topic/css-for-img-within-posts/#post-666556)
 * Thank you. This solved the problem.
 * .entry is also an option. I think it includes only the content of the post and
   not the title and date.
 * I am building on the kubrik theme.

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

The topic ‘css for IMG within posts’ is closed to new replies.

 * 2 replies
 * 2 participants
 * Last reply from: [pdlr](https://wordpress.org/support/users/pdlr/)
 * Last activity: [18 years, 6 months ago](https://wordpress.org/support/topic/css-for-img-within-posts/#post-666556)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
