Title: CSS problems with plugin
Last modified: August 22, 2016

---

# CSS problems with plugin

 *  Resolved [theArab](https://wordpress.org/support/users/thearab/)
 * (@thearab)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/)
 * Hello, I’m new to the forum and pretty new to WordPress.
    So please be kind to
   me! I’ve recently built a plugin and for the most part it’s working great. Functionally
   it’s working perfectly. But I’m having a rather difficult time getting the style
   sheet of my plugin to work with a variety of themes. It seems that with some 
   themes, it looks perfect. 🙂 Sadly, on others it is completely hideous! 🙁 This
   is mostly on themes with a darker scheme, but it happens on some intricate ones
   too. It looks like some themes override my style sheet completely. I’ve looked
   all over for a solution, tried enqueing my style sheet as is suggested in the
   forum here. But this never has any effect. My style sheet is dynamic — it allows
   the admin to pick from some pre-set color patterns. So the CSS file is actually
   a PHP file that loads variables into the css. I don’t know if this is why enqueing
   does not work? I AM able to override some themes styles by using “!important”
   on my own style sheet. But I’m not happy with this because sometimes it totally
   bungs up the rest of the theme. I’m sure there must be a solution to this that
   I just can’t seem to figure out. I’d absolutely LOVE to get this so that it works
   with the individual theme’s settings. Can anyone suggest anything or point me
   in the right direction of some quality reading? Sometimes I just don’t know the
   exact term I should use to search for and once I get there I can usually figure
   it out. Anyhow, if anyone has any suggestions — I humbly appreciate any help!
   Thank you!

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

 *  [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541206)
 * I would use very specific naming of css-classes. Like:
 * `.my-very-special-plugin h1`
 * and also be very specific in your stylesheet, like:
 * `body > .my-very-special-plugin-container > h2.my-very-special-plugin-header`
 * Try wrapping your markup with a wrapper div with a specific class.
 * Other than that, there will always be a problem with conflicting styles.
 * A link to your plugin would be helpful.
 * Good luck
 *  Thread Starter [theArab](https://wordpress.org/support/users/thearab/)
 * (@thearab)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541251)
 * Thanks so much for taking the time to reply! I’ll try it out! Cheers! Sorry I
   spaced out on leaving a link. here it is: [https://wordpress.org/plugins/skedmaker-online-scheduling](https://wordpress.org/plugins/skedmaker-online-scheduling)
 *  [rcs.ctr](https://wordpress.org/support/users/rcsctr/)
 * (@rcsctr)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541322)
 * sent a link of your site and what you would like to happen.
 * Thanks!
 *  Thread Starter [theArab](https://wordpress.org/support/users/thearab/)
 * (@thearab)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541366)
 * Thanks. I edited a lot of my CSS, but it is still a tad clunky on some themes.
   Looks like some are formatting certain elements and ignoring my styles, unless
   I add !important to the attribute. But then, when I do this, it modifies the 
   rest of the CSS on the theme. That’s a bummer. But there is not much else I can
   find to be a solution for it.
    \
 *  [fried_eggz](https://wordpress.org/support/users/fried_eggz/)
 * (@fried_eggz)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541368)
 * But if you use unique class names and only use !important on those classes and
   not on general tags like p or h2, then the !Important parameter should only affect
   your styles.
 *  Thread Starter [theArab](https://wordpress.org/support/users/thearab/)
 * (@thearab)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541385)
 * Thanks for the help guys! It looks like when I use, for example, a <td> tag the
   style for it being overrrided — or even better appended. The theme style will
   add to my style for the <td>. For example, if I have in my css something like
   this:
 * td.sm-pad7border{padding:7px; border:1px solid #333; text-align:left;}
 * The css from the theme is also being applied to the td.
    And only if I anticipate
   any css from the theme can I overrride it with !important in my css.
 * I’m not sure if it would be wiser to name my individual css for these without
   the td. ? and just name it .sm-pad7border{style here;} instead?
 *  [rcs.ctr](https://wordpress.org/support/users/rcsctr/)
 * (@rcsctr)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541396)
 * If this is resolved please post as resolve if not please mention additional help
   needed.
 * Thanks!

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

The topic ‘CSS problems with plugin’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [style sheets](https://wordpress.org/support/topic-tag/style-sheets/)
 * [Themes](https://wordpress.org/support/topic-tag/themes/)

 * In: [Hacks](https://wordpress.org/support/forum/plugins-and-hacks/hacks/)
 * 7 replies
 * 3 participants
 * Last reply from: [rcs.ctr](https://wordpress.org/support/users/rcsctr/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/css-problems-with-plugin/#post-5541396)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
