Title: CSS in plugin directory overrides theme CSS?
Last modified: August 22, 2016

---

# CSS in plugin directory overrides theme CSS?

 *  Resolved [gkbenji](https://wordpress.org/support/users/gkbenji/)
 * (@gkbenji)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/)
 * First just an FYI that the transition to the new version of GCE wasn’t seamless…
   the calendar widget disappeared for a bit, and didn’t return until I went to 
   the widget, retyped the feed # (there’s only one feed) and re-saved. Then the
   calendar reappeared, but with all the custom styling missing.
 * Okay, I knew that, copied everything from the custom CSS file and pasted it into
   my child theme’s main CSS file. But not all the styles were correct.
 * According to Firebug, the CSS in the plugin directory is taking precedence over
   CSS in the main theme CSS?! For example, for days with no events, the theme CSS
   specifies color #666. But the color being used is the plugin default #cccccc.
 * You can see the calendar widget on the right side of the site: [http://www.rivendell-school.org](http://www.rivendell-school.org).
 * I’m probably missing something stupid, but what is it? Thanks.
 * [https://wordpress.org/plugins/google-calendar-events/](https://wordpress.org/plugins/google-calendar-events/)

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

 *  [Bernd](https://wordpress.org/support/users/bernd-albers/)
 * (@bernd-albers)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313471)
 * Have you tried this in the theme css?
 * #666 !important;
 * Worked in my theme.
 *  Thread Starter [gkbenji](https://wordpress.org/support/users/gkbenji/)
 * (@gkbenji)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313472)
 * Thanks Bernd, but that is just one example of the many styles I have that aren’t
   working. I don’t want to have to go put !important in front of every one.
 * A workaround I can use for now might be to rename the CSS file in the plugin 
   directory (although I’m leaving it for now so the CGE developers can take a look).
   But the styles in my theme should take precedence over those in the plugin directory,
   right? CGE no longer supports the custom CSS file that gets parsed last.
 * Hmmm… following up on that, I checked the page source header, and it does look
   like plugin style sheets get loaded AFTER the theme CSS. Bleh. That may be why
   many plugins that have their own CSS but may need lots of styling allow a custom
   CSS file to be specified.
 * So, perhaps change this to a request to bring back the custom CSS file.
 * I the meantime, I will look for another workaround (I already have a plugin that
   will allow you to add a custom class to a widget, that may be the best option).
 *  Plugin Contributor [Nick Young](https://wordpress.org/support/users/nickyoung87/)
 * (@nickyoung87)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313496)
 * [@gkbenji](https://wordpress.org/support/users/gkbenji/)
 * What is the CSS selector that is actually being used by the plugin that you are
   trying to modify and then what is the CSS selector you are using to try and change
   it?
 * I want to make sure it isn’t a CSS specificity issue, which is what it sounds
   like it might be.
 *  Plugin Contributor [Nick Young](https://wordpress.org/support/users/nickyoung87/)
 * (@nickyoung87)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313570)
 * Going to assume this has been resolved since there has been no response. If you
   have any more issues please let us know. Thanks!
 *  [slb535](https://wordpress.org/support/users/slb535/)
 * (@slb535)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313597)
 * I”m having this exact issue. Do I really need to put !important at every custom
   style?
 *  [slb535](https://wordpress.org/support/users/slb535/)
 * (@slb535)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313598)
 * So, to be more clear, I have completely customized every instance I have of this
   calendar. It had resided in it’s own css file in the old plugin. Now, although
   I’ve put it in my main css file, it is overridden by the plugin’s stylesheet 
   because it loads after it.
 * Is there any chance of reinstating the old plugin’s customized css path?
 *  Plugin Contributor [Nick Young](https://wordpress.org/support/users/nickyoung87/)
 * (@nickyoung87)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313600)
 * You would not necessarily need to use !important, you could also make it more
   specific by using an element ID of a wrapper if there is one.
 * Example:
 * #content .gce-list {}
    .gce-list {}
 * The first one is more specific so it would get used over the general one the 
   plugin CSS is using.
 * As far as your other question about reinstating the CSS path, I am not sure. 
   But you can head over to the road map and let us know it is important to you 
   so we can keep track of these kinds of things.
 * [https://trello.com/b/ZQSzsarY](https://trello.com/b/ZQSzsarY)
 * Thanks
 *  [eric3d](https://wordpress.org/support/users/eric3d/)
 * (@eric3d)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313605)
 * Thanks Nick,
 * The more specific CSS works, but it also adds bulk to the file (load the gce 
   styles then override them with specific styles).
 * I would rather have an option to NOT load the gce styles in settings (turned 
   off by default for the majority of users and only used if the developer has included
   gee styles in the theme)

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

The topic ‘CSS in plugin directory overrides theme CSS?’ is closed to new replies.

 * ![](https://ps.w.org/google-calendar-events/assets/icon-256x256.png?rev=1263960)
 * [Simple Calendar - Google Calendar Plugin](https://wordpress.org/plugins/google-calendar-events/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/google-calendar-events/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/google-calendar-events/)
 * [Active Topics](https://wordpress.org/support/plugin/google-calendar-events/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/google-calendar-events/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/google-calendar-events/reviews/)

 * 8 replies
 * 5 participants
 * Last reply from: [eric3d](https://wordpress.org/support/users/eric3d/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/css-in-plugin-directory-overrides-theme-css/#post-5313605)
 * Status: resolved