Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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 has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1 Answer 1

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.