Title: CSS Inheritance
Last modified: August 19, 2016

---

# CSS Inheritance

 *  Resolved [ahrenba](https://wordpress.org/support/users/ahrenba/)
 * (@ahrenba)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/css-inheritance/)
 * Hey Guys,
 * Just a little confused here.
 * I have an img class=”wp-smiley” that is defined in the CSS by:
 * .wp-smiley {
    border:medium none; padding:0 5px 0 0; }
 * However, it is not being used because the style:
    #content p img { border:medium
   none; padding:0 5px 15px 0; }
 * Is overriding it. I am a bit new to CSS. Why would that be overriding? I realize
   I could just make a CSS statement like:
 * #content p img.wp-smiley {
    border:medium none; padding:0 5px 5px 0; }
 * But I am just trying to figure this out for knowledge sake. Using Firebug I see
   that it is referencing the style, but it is crossed out because that other style
   is overriding it?
 * I thought that if you define a single class like that, it’ll override anything
   previous?

The topic ‘CSS Inheritance’ is closed to new replies.

 * 0 replies
 * 1 participant
 * Last reply from: [ahrenba](https://wordpress.org/support/users/ahrenba/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/css-inheritance/)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
