JLeonard
JLeonard

Reputation: 9138

css is getting overridden by .js inserted styles (Alloy UI)

I have a situation where the .css in my head tag is getting overridden by css that's being inserted dynamically into the head by a javascript library.

The .js library automatically appends the new .css link to the end of the head tag so it is always put on top of my styles.

Upvotes: 0

Views: 1851

Answers (1)

robertc
robertc

Reputation: 75707

You have several options:

  1. Use a different JavaScript library
  2. Make sure all your rules have a higher specificity than the ones added by the library
  3. Learn about !important

Upvotes: 2

Related Questions