Title: Prioritizing child CSS
Last modified: December 28, 2016

---

# Prioritizing child CSS

 *  [Nikodemsky](https://wordpress.org/support/users/nikodemsky/)
 * (@nikodemsky)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/prioritizing-child-css/)
 * So it’s not often when i’m getting to work with some nasty coded themes and right
   now i’m using one, that uses multiple stylesheet files and every setting in theme
   option(colors, backgrounds etc.) are set with !important rule. Sure, it works,
   but if theme itself using !important to overwrite it’s own styles, then something
   is off(at least in my opninion).
 * Right now i’m using child theme for my own customizations and i have problem 
   with child css – i need to patch almost every style with !important, which makes
   a tens of lines with something i don’t like to do. Is there some kind of good
   way to prioritize child theme css over parent? I know, that it should do it by
   default, but that’s not the case.
 * Code i’m using to call for stylesheets right now:
 *     ```
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', PHP_INT_MAX);
   
       function theme_enqueue_styles() {
           wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
           wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'parent-style' ) );
       }
       ```
   
 * Would appreciate any help in that matter. Yes, i have tried cleaning cookies 
   etc.

Viewing 1 replies (of 1 total)

 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/prioritizing-child-css/#post-8598588)
 * This issue will be best addressed by the folks who have provided the parent theme.
   The Parent Theme needs to support a Child Theme.
 * For this topic to be a .org support issue, the Theme needs to be one listed on.
   org.
 * What theme are you using and where did you get it?
 * Please refer to the Codex:
 * [https://codex.wordpress.org/Child_Themes](https://codex.wordpress.org/Child_Themes)
 * And this support topic:
 * [https://codex.wordpress.org/Forum_Welcome#Commercial_Products](https://codex.wordpress.org/Forum_Welcome#Commercial_Products)
 * That said, we cannot help with CSS issues unless we can review the site.
 * Please see:
 * [https://codex.wordpress.org/Forum_Welcome#Link_to_Your_Site](https://codex.wordpress.org/Forum_Welcome#Link_to_Your_Site)

Viewing 1 replies (of 1 total)

The topic ‘Prioritizing child CSS’ is closed to new replies.

## Tags

 * [child css](https://wordpress.org/support/topic-tag/child-css/)
 * [child theme](https://wordpress.org/support/topic-tag/child-theme/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/prioritizing-child-css/#post-8598588)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
