Title: Child theme additional css not working
Last modified: March 16, 2022

---

# Child theme additional css not working

 *  [dso1](https://wordpress.org/support/users/dso1/)
 * (@dso1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/child-theme-additional-css-not-working/)
 * Hi,
 * with the 1.3 version the child theme’s additional css is not overriding the parent
   css.
    ie.
 *     ```
       .np-home-icon a {
       	background: red;
       }
       ```
   
 * Earlier version (1.14) worked as it should.
 * I’ve tried to enque the child css after the parent, but it neither worked.
 *     ```
       add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
       function my_theme_enqueue_styles() {
   
           $parent_style = 'news-portal-css';
   
           wp_enqueue_style( 'child-style',
               get_stylesheet_directory_uri() . '/style.css',
               array( $parent_style ),
               wp_get_theme()->get('Version')
           );
       }
       ```
   
 * Maybe the code is not right.
 * Any help?

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

 *  Theme Author [Mystery Themes](https://wordpress.org/support/users/mysterythemes/)
 * (@mysterythemes)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/child-theme-additional-css-not-working/#post-15468237)
 * Hello [@dso1](https://wordpress.org/support/users/dso1/)
 * Can you please replace it with the following code?
 * **.np-home-icon a {
    background: red !important; }
 * Hope this will work for you.
 * Thanks,
 *  Thread Starter [dso1](https://wordpress.org/support/users/dso1/)
 * (@dso1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/child-theme-additional-css-not-working/#post-15470247)
 * Hi,
 * thank You for the quick answer!
 * It works with _!important_, but then there are other problems:
 *     ```
       #site-navigation ul li.current-menu-item > a {
       	background: red !important;
       }
       ```
   
 * this will prevent the current menu item to change color with hover.
    To solve
   this i have to make all menu item (hover) colors also _!important_.
 * As i said the 1.14 version worked very well without this problem.
 *  Theme Author [Mystery Themes](https://wordpress.org/support/users/mysterythemes/)
 * (@mysterythemes)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/child-theme-additional-css-not-working/#post-15472933)
 * Hello [@dso1](https://wordpress.org/support/users/dso1/)
 * Can you provide us the live URL so that we can check it and verify the issue ?
 * Also you can take backup of current child theme and make another child theme 
   again for 1.14 and delete current one after taking backup so that it may confirm
   that child theme was working properly or not & that may solve your issue.
 * You can also use this plugin to generate child theme:
    [Child Theme Configurator](https://wordpress.org/plugins/child-theme-configurator/)
 * Hope this helps you !!
 * Thanks 🙂

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

The topic ‘Child theme additional css not working’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/news-portal/1.5.13/screenshot.
   png)
 * News Portal
 * [Support Threads](https://wordpress.org/support/theme/news-portal/)
 * [Active Topics](https://wordpress.org/support/theme/news-portal/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/news-portal/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/news-portal/reviews/)

## Tags

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

 * 3 replies
 * 2 participants
 * Last reply from: [Mystery Themes](https://wordpress.org/support/users/mysterythemes/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/child-theme-additional-css-not-working/#post-15472933)
 * Status: not resolved