Title: Using custom class for post only
Last modified: August 18, 2016

---

# Using custom class for post only

 *  [soulcreeper](https://wordpress.org/support/users/soulcreeper/)
 * (@soulcreeper)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/using-custom-class-for-post-only/)
 * is ther a way to use a class only for post-content?
 * i already tried entering the css style into the stylesheet of the current theme
   and then applying the class to, for example, an image in my post, but that didnt
   work.
 * so now i wanna know how i am able to use a class on the image that’s already 
   predefined in some stylesheet

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

 *  [Samuel B](https://wordpress.org/support/users/samboll/)
 * (@samboll)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/using-custom-class-for-post-only/#post-428219)
 * `<img class=blahblah>`
    Turn off the wysiwyg editor to do coding, though. It 
   messes up your code.
 *  Thread Starter [soulcreeper](https://wordpress.org/support/users/soulcreeper/)
 * (@soulcreeper)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/using-custom-class-for-post-only/#post-428511)
 * i already tried that, but appearantly that didnt work.
    i entered the class in
   the stylesheet of the current theme and gave the img the right classname but 
   nothing happened.
 *  [dannybcastillo](https://wordpress.org/support/users/dannybcastillo/)
 * (@dannybcastillo)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/using-custom-class-for-post-only/#post-428535)
 * It might help if you gave the web address where your having this proplem. It 
   make just make it easier for everyone that would like to help you.
 *  Thread Starter [soulcreeper](https://wordpress.org/support/users/soulcreeper/)
 * (@soulcreeper)
 * [19 years, 10 months ago](https://wordpress.org/support/topic/using-custom-class-for-post-only/#post-428565)
 * hmz, funny thing happened. i must have typed something wrong the first time i
   was trying this, but now that i tried it again it did work.
    now i’m using something
   like `class="postimg_l"`in the image tag and in the stylesheet i’m using `img.
   postimg_l { float:left;}` and this does the trick just fine.
 * here’s an [example](http://www.soulcreeper.net/2006/sorry-mag-ik-even-uitpra-nee-dat-mag-je-niet/)

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

The topic ‘Using custom class for post only’ is closed to new replies.

## Tags

 * [class](https://wordpress.org/support/topic-tag/class/)
 * [custom](https://wordpress.org/support/topic-tag/custom/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [soulcreeper](https://wordpress.org/support/users/soulcreeper/)
 * Last activity: [19 years, 10 months ago](https://wordpress.org/support/topic/using-custom-class-for-post-only/#post-428565)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
