Author Topic: What does the statement (!important) stands for?  (Read 18730 times)

Tayab

  • Full Member
  • ***
  • Posts: 149
What does the statement (!important) stands for?
« 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.

Tayab

  • Full Member
  • ***
  • Posts: 149
Re: What does the statement (!important) stands for?
« Reply #1 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?

Jaffery

  • Administrator
  • Full Member
  • *****
  • Posts: 158
Re: What does the statement (!important) stands for?
« Reply #2 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 ?

Tayab

  • Full Member
  • ***
  • Posts: 149
Re: What does the statement (!important) stands for?
« Reply #3 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?

Jaffery

  • Administrator
  • Full Member
  • *****
  • Posts: 158
Re: What does the statement (!important) stands for?
« Reply #4 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.

 

X

Do you know?

By participating in our community you can get free Top Level Domain for lifetime.
Know more..
Join Now!
anything