Using the !important command.

Joined
9 May 2005
Posts
2,511
I have a question about the !important command that you can use after codes to make it definite. I always thought that if you placed it after something then it would only make that thing important and not anything else in its group.

It will probably be easier if I give an example.

a {
color: white!important;
font-size:16pt;
font-family: Calibri;
font-weight: 700;
}

Now with the above hyperlink code the !important tag is making everything important in the browser and not just the color. Although this only seems to happen in IE and not Firefox.

Is there anyway round this or am I doing it completely wrong?
 
Thanks for the suggestions guys, I tried first adding a space between the code and the !important but it made no difference.

I double checked my code and spotted my error, after sorting all is well without the need for that !important command.

Its funny that you can look and look at code and swear that its 100% correct and efficient and then after the third time looking it just pops out at you :p
 
Back
Top Bottom