Title: Cannot Get CSS Files to Enqueue Correctly
Last modified: August 31, 2016

---

# Cannot Get CSS Files to Enqueue Correctly

 *  [nateonawalk](https://wordpress.org/support/users/natesirrah/)
 * (@natesirrah)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/cannot-get-css-files-to-enqueue-correctly/)
 * I’m running [a theme ](https://wordpress.org/themes/briar/) that includes all
   of its actual effective stylesheets in a /css/ directory, including a “style.
   css” that contains all the CSS rules of the theme. I’m attempting to learn the
   proper way to enqueue a stylesheet instead of the [@import](https://wordpress.org/support/users/import/)
   rule with my child theme, but am really struggling!
 * At present I have a normal child theme style.css and a functions.php that contains
   the following:
 *     ```
       <?php
   
       function theme_enqueue_styles() {
       	wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
           wp_enqueue_style( 'css parent', get_template_directory_uri() . '/css/style.css' );
           wp_enqueue_style( 'css min', get_template_directory_uri() . '/css/style.min.css' );
           wp_enqueue_style( 'css blue', get_template_directory_uri() . '/css/style-blue.css' );
           wp_enqueue_style( 'css blue min', get_template_directory_uri() . '/css/style-blue.min.css' );
       	wp_enqueue_style( 'css green', get_template_directory_uri() . '/css/style-green.css' );
       	wp_enqueue_style( 'css green min', get_template_directory_uri() . '/css/style-green.min.css' );
       	wp_enqueue_style( 'css orange', get_template_directory_uri() . '/css/style-orange.css' );
       	wp_enqueue_style( 'css orange min', get_template_directory_uri() . '/css/style-orange.min.css' );
       	wp_enqueue_style( 'css violet', get_template_directory_uri() . '/css/style-violet.css' );
       	wp_enqueue_style( 'css violet min', get_template_directory_uri() . '/css/style-violet.min.css' );
       	wp_enqueue_style( 'css yellow', get_template_directory_uri() . '/css/style-yellow.css' );
       	wp_enqueue_style( 'css yellow min', get_template_directory_uri() . '/css/style-yellow.min.css' );
           wp_enqueue_style( 'child-style', get_stylesheet_uri(), array('parent-style')  );
   
       }
   
       add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
   
       ?>
       ```
   
 * But the CSS changes I’m making in my child’s CSS are overwritten (inspect element
   shows that they are applied but the parent theme’s stylesheet is applied afterward).
   What am I doing wrong? Thank you in advance for any help!
 * **I’m developing locally, so I can’t link to my site atm.

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

 *  [Gorakh Shrestha](https://wordpress.org/support/users/gorakhsth/)
 * (@gorakhsth)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/cannot-get-css-files-to-enqueue-correctly/#post-6903180)
 * I think there should not be space in your
    `wp_enqueue_style( 'css parent', get_template_directory_uri().'/
   css/style.css' );`
 * can you try all those name with _ or –
 * `wp_enqueue_style( 'css-parent', get_template_directory_uri() . '/css/style.css');`
 *  Thread Starter [nateonawalk](https://wordpress.org/support/users/natesirrah/)
 * (@natesirrah)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/cannot-get-css-files-to-enqueue-correctly/#post-6903196)
 * Thanks for the suggestion gorakh.sth — adding dashes “-” in the places where 
   spaces were did not seems to make a difference in functionality. Any other hunches?
 *  Thread Starter [nateonawalk](https://wordpress.org/support/users/natesirrah/)
 * (@natesirrah)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/cannot-get-css-files-to-enqueue-correctly/#post-6903391)
 * Update: I’ve tried with and without dashes, spaces, and underscores now — doesn’t
   seem to be making a difference. If anyone has any ideas or needs other info, 
   I’d really appreciate help :). Thanks!

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

The topic ‘Cannot Get CSS Files to Enqueue Correctly’ is closed to new replies.

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [nateonawalk](https://wordpress.org/support/users/natesirrah/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/cannot-get-css-files-to-enqueue-correctly/#post-6903391)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
