Title: Child theme CSS
Last modified: August 21, 2016

---

# Child theme CSS

 *  [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/)
 * I’m comfortable creating a child theme and importing its parent’s CSS. What I’m
   unclear about is how to customize or override the parent’s CSS. I thought I could
   put those rules into the child’s style.css file, after the import rule, but anything
   I put there is not being loaded. Should I instead be using Jetpack’s “[Edit CSS](http://jetpack.me/support/custom-css/)”
   function?
 * -Ken

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

 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776512)
 * You can use either Edit CSS or a child theme – but probably easier to use one
   or the other so you don’t have code in two places. I’d go for the child theme.
 * If your overrides are not working – there are several possible reasons –
    child
   theme not set up correctly CSS syntax or code errors CSS that’s not “specific”
   enough to override the parent a theme that won’t work with a child theme
 * There are other reasons but more complicated to explain here. Do you have a site
   that’s being cranky?
 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776514)
 * Thank you for the quick response, sir!
 * Am I allowed to use both overrides **and** the import function? Or am I supposed
   to copy the parent site’s style.css file entirely and then make changes to it?
 * -Ken
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776516)
 * (Not a sir :)!)
 * Override just means using the inherent properties of CSS – more “specific” code
   will take precedence and/or that CSS is read “top-down” to later code takes precedence
   if the specificity is the same.
 * You do need to use the [@import](https://wordpress.org/support/users/import/)
   rule and no, don’t copy the entire file.
 * A great tool for CSS is Firebug addon for Firefox.
 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776518)
 * Oops! Sorry for the salutation. I certainly meant no disrespect.
 * Here’s a very simple example of what I’m trying to do:
 *     ```
       /*
       Theme Name: Fiver child
       Description: Child theme for the Fiver! theme
       Template: fiver
       */
   
       @import url("../fiver/style.css");
   
       div.sharedaddy ul, div.sharedaddy li {
          float: right;
       }
       ```
   
 * The `div.sharedaddy` code is not taking effect, nor is anything else I after 
   the `@import` rule. To be clear, it **should** be working?
 * -Ken
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776521)
 * No prob – I never take that personally :)!
 * Can’t really debug something like this without seeing the actual page/site. I
   don’t see any obviously problems, but can’t tell much just looking at code. Can
   you post a link to it?
 * Lists CSS can be tricky too.
 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776656)
 * WPyogi,
 * Here’s the site that’s currently giving me fits:
 * [http://www.worcesterdance.org/](http://www.worcesterdance.org/)
 * The child theme’s style.css file is (after importing the parent’s CSS) supposed
   to define the width as 700px with no border around tables — yet instead the width
   appears to be the parent’s default of 550px, with table borders.
 * No caching plugins are activated!
 * -Ken
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776657)
 * I don’t see any styles in that file at all?
 * And this HTML shows the width of the table inline:
 *     ```
       <table width="674" border="0">
       ```
   
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776658)
 * Another potential issue is that the regular child theme stylesheet is enqueued
   ABOVE the other ones, so any changes are going to get overridden unless you make
   them all more specific.
 * Where did you get this theme?
 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776659)
 * Something odd is going on with this file:
 * [http://www.worcesterdance.org/wp-content/themes/fiver-child/style.css](http://www.worcesterdance.org/wp-content/themes/fiver-child/style.css)
 * When I download it via FTP vs. when I view it in Chrome, I’m not seeing the same
   thing.
 * Is the above link currently showing you nothing after the [@import](https://wordpress.org/support/users/import/)
   rule?
 * -Ken
 *  Thread Starter [Ken Gagne](https://wordpress.org/support/users/kgagne/)
 * (@kgagne)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776660)
 * I got the theme from the WordPress repository:
 * [http://wordpress.org/themes/fiver](http://wordpress.org/themes/fiver)
 * Is the stylesheet queue something that can be addressed in the `header.php` file?
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776661)
 * Yes, that file looks fine and has code but that’s not the link I saw on your 
   page earlier – it looked like a pagespeed cached page?
 * And now this is what shows in View Source for that link – something’s not right–
 *     ```
       <style media="screen">@import url(wp-content/themes/fiver/style.css) ;</style>
       ```
   
 *  [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * (@wpyogi)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776662)
 * Wow, never seen that theme – not widely used :)!

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

The topic ‘Child theme CSS’ is closed to new replies.

## Tags

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

 * 12 replies
 * 2 participants
 * Last reply from: [WPyogi](https://wordpress.org/support/users/wpyogi/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/child-theme-css-2/#post-3776662)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
