Title: Using !important in css
Last modified: August 20, 2016

---

# Using !important in css

 *  [Webtaurus](https://wordpress.org/support/users/and_or/)
 * (@and_or)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/)
 * Hi Nathan thanks for the nice update.
 * I noticed you use !important quite a few times in the plugin css. That makes 
   it a lot harder to override the css in the template css.
    So one ends up having
   to edit the plugin css. (which will result in having to correct after the next
   update)
 * Why are these properties set to !important ?:
 *     ```
       .simple-social-icons ul li {
       	background: none !important;
       	border: none !important;
       	float: left;
       	list-style-type: none !important;
       	margin: 0 6px 12px;
       	padding: 0 !important;
       }
       ```
   
 * [http://wordpress.org/extend/plugins/simple-social-icons/](http://wordpress.org/extend/plugins/simple-social-icons/)

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

 *  Plugin Contributor [Brian Gardner](https://wordpress.org/support/users/bgardner/)
 * (@bgardner)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597183)
 * We used important because we needed to override any styling that might be happening
   in containers such as #sidebar, etc.
 *  [Andrew Munro / AffiliateWP](https://wordpress.org/support/users/sumobi/)
 * (@sumobi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597246)
 * Nice update. Is it possible to allow developers to remove the action that generates
   the CSS so we can write our own if required? Eg this line in the plugin that 
   builds out the CSS.
 * `add_action( 'wp_head', array( $this, 'css' ) );`
 * Normally I’d just the following, but because the plugin is wrapped in a class
   I probably need a bit more trickery:
 * `remove_action('wp_head', 'function_name');`
 *  Plugin Contributor [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597247)
 * The easy way to do it is make your own class that extends the Simple_Social_Icons_Widget
   that has your custom css function. Then unregister the Simple_Social_Icons_Widget
   and register your own.
 *  [Andrew Munro / AffiliateWP](https://wordpress.org/support/users/sumobi/)
 * (@sumobi)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597248)
 * Great, thanks for that Ron
 *  [David Wang](https://wordpress.org/support/users/blogjunkie/)
 * (@blogjunkie)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597250)
 * Could you also add this:
 * _[ Moderator Note: [Please post code](http://codex.wordpress.org/Forum_Welcome#Posting_Code)
   or markup snippets between backticks or use the code button. ]_
 * `text-shadow: 0 0 !important;`
    Many themes (from StudioPress too) contain styles
   to make text have a little 3D effect. This causes the icons to look fuzzy. The
   above code fixes that. Thanks
 *  Thread Starter [Webtaurus](https://wordpress.org/support/users/and_or/)
 * (@and_or)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597252)
 * [@blogjunkie](https://wordpress.org/support/users/blogjunkie/) Why don’t you 
   just put your text-shadow code in your own css (childtheme) ?
 * It’s bad practice to put overriding css code in a plugin, especially adding the
   important statement. The important makes it near impossible to override the css
   in the child-theme css.
    I don’t agree with the way Simple Social Icons does 
   this now.
 * It’s no drama, but its the first time ever that I had to change a plugin css (
   just took away 1 !important) instead of controlling all from style.css

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

The topic ‘Using !important in css’ is closed to new replies.

 * ![](https://ps.w.org/simple-social-icons/assets/icon.svg?rev=3358424)
 * [Simple Social Icons](https://wordpress.org/plugins/simple-social-icons/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-social-icons/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-social-icons/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-social-icons/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-social-icons/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-social-icons/reviews/)

 * 6 replies
 * 5 participants
 * Last reply from: [Webtaurus](https://wordpress.org/support/users/and_or/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/using-important-in-css/#post-3597252)
 * Status: not resolved