Designing and Development > Graphics and Designing

What does the statement (!important) stands for?

(1/1)

Tayab:
I've always seen that always inside CSS. I am inquisitive about what does that mean and why is this used for?


--- Code: ---            !important;
            !important;

--- End code ---

They are covered this way.


--- Code: ---    .bodyline {
            background: transparent !important;
            border: none !important;
        }

--- End code ---


Thanks for reading.

Tayab:
This is the term of css, mostly seen in CSS stylesheets but can't get what is the actuall usage of this. Would someone tell me?

Jaffery:
It simply means if there is more than one definition for same element in CSS, it should follow only the one with !important tag ?

Tayab:
Alright, so the one with not having important will not effect? If so why don't we just remove the useless things?

Jaffery:
CSS has a kind of precedence system, so sometimes few , I don't really remember what its called, there are cases when it is absolutely necessary, eg. a situation where you have a page where you are adding own page specific css and on that very page  you want to over write its appearance which is decided by main css... its just an example, since  now you have some idea about it, when you will get in situation which need this , you will naturally understand its need.

Navigation

[0] Message Index

Go to full version