Webmaster's Community

Designing and Development => Graphics and Designing => Topic started by: Tayab on October 30, 2012, 02:17:53 AM

Title: What does the statement (!important) stands for?
Post by: Tayab on October 30, 2012, 02:17:53 AM
I've always seen that always inside CSS. I am inquisitive about what does that mean and why is this used for?

Code: [Select]
            !important;
            !important;

They are covered this way.

Code: [Select]
    .bodyline {
            background: transparent !important;
            border: none !important;
        }


Thanks for reading.
Title: Re: What does the statement (!important) stands for?
Post by: Tayab on December 01, 2012, 03:23:26 AM
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?
Title: Re: What does the statement (!important) stands for?
Post by: Jaffery on December 05, 2012, 05:44:48 AM
It simply means if there is more than one definition for same element in CSS, it should follow only the one with !important tag ?
Title: Re: What does the statement (!important) stands for?
Post by: Tayab on December 05, 2012, 05:56:16 AM
Alright, so the one with not having important will not effect? If so why don't we just remove the useless things?
Title: Re: What does the statement (!important) stands for?
Post by: Jaffery on December 06, 2012, 02:27:22 PM
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.