WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
best way to overide plugin CSS?

Now and again I would come across a great wordpress plugin with it's own css style sheet. I could edit the css in the plugin folder and it would work like a charm but if there was ever an update for the plugin, it would overwrite my custom css that I applied to it.

I know that I can target the class of the plugin in my own css and applying !important; to the end of the css style. I've read though that this isn't good practice.

Is adding !important to the end of a css style bad practice and if so, what is the best way of targeting custom css of a wordpress plugin?

Thanks Tyler

share|improve this question

marked as duplicate by Chip Bennett, EAMann Feb 15 '12 at 14:47

This question was marked as an exact duplicate of an existing question.

You can either do it the way you are doing it now, or you can use the rule of greater specificity (ex div.foo > ul#bar > li.baz is more specific than just #bar > .baz).

P.S. I am not sure this is WordPress-specific.

share|improve this answer
The CSS part of the question itself certainly isn't WordPress-specific; however, the question of how to override Plugin-defined CSS rules is WordPress-specific. It seems, though, that this question has already been asked elsewhere on WPSE. – Chip Bennett Feb 15 '12 at 14:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.