Title: Question about adding a CSS Class
Last modified: August 22, 2016

---

# Question about adding a CSS Class

 *  [JJ5678](https://wordpress.org/support/users/jj5678/)
 * (@jj5678)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/question-about-adding-a-css-class/)
 * I am a little unsure but i believe that I need to add a new Class in order to
   amke a selected number of images display centered. But I don’t really know whether
   to add the Class in my child themes style.css file or do I do it in the parent
   theme? I would very much appreciate anyone that can show me the code to do this
   as well, because I am still very unsure on how to add a class.
    I think to add
   to the class “img” it is done like this
 * img.newclassname {
    align: center; }
 * Am I on the right track?

Viewing 1 replies (of 1 total)

 *  [Jan Cavan Boulas](https://wordpress.org/support/users/mj12982/)
 * (@mj12982)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/question-about-adding-a-css-class/#post-5366297)
 * [@jj5678](https://wordpress.org/support/users/jj5678/)
 * No, that’s not the way to center images, but you are right about the class name,
   although putting `img` before the class name is not really necessary. Can you
   share the link to your site?

Viewing 1 replies (of 1 total)

The topic ‘Question about adding a CSS Class’ is closed to new replies.

## Tags

 * [classes](https://wordpress.org/support/topic-tag/classes/)
 * [css](https://wordpress.org/support/topic-tag/css/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jan Cavan Boulas](https://wordpress.org/support/users/mj12982/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/question-about-adding-a-css-class/#post-5366297)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
