Jon Smith Jon Smith - 1 year ago 241
CSS Question

Use of !important CSS warning

I'm in the process of creating a website with the aid of plugins and

, the plugins are
LearnDash, BuddyBoss
, and I'm having trouble keeping the top navigation bar to stay the same before and after someone logs in, it's how I'd like it when I log in, but not before hand.

So I got help off support staff from
about this and they gave me some code which contains an warning that I've never come across before, the line of code that it is, is.

color: #012243!important;

There is no other lines of code inside the
, the warning is
Use of !important

How do I fix this?

Answer Source

Using of important! modifier is somewhat discouraged, but also, in most cases of prebuilt themes, the most appropriate way to override default settings. So, in your case, that's probably the only way you can override default color. Just use it if it works.

Also, I would write that rule as:

color: #012243 !important;

So, put a space between color code and !important.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download