Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have uploaded a media picture to a post the HTML I saw as such

<a href="http://localhost/self/wp-content/uploads/2013/03/pic1.png"><img src="http://localhost/self/wp-content/uploads/2013/03/pic1.png" alt="pic1" width="260" height="260" class="alignnone size-full wp-image-204" />

How do I css style on this image? I can't use class="alignnone size-full wp-image-204" because on the next new post, that class name could be different. All my post will have exactly one image and will be in the same location.

share|improve this question

1 Answer 1

In most themes you will be able to target every image in all your posts with the following css:

.type-post img { PUT CSS STYLES HERE }

This may not work, however, depending on the theme you're using, and whether or not your new styles conflict with higher-priority css. If you post a link to your website I can give you a definitive answer.

share|improve this answer
    
if it's custom type, for example, rating type, I could do .type-rating img { ...} –  jason hong Apr 4 '13 at 23:49
    
Generally, yes. If you post a link I can help you more. –  Griffin Apr 5 '13 at 1:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.