!important is generally used to distinguish between IE6 and Firefox, such as the basic hack method of browser. Because IE6 does not support!important, and Firefox can read!important, it changes the priority of the style. In fact IE6 in some cases, can also know!important.
For example:
<styletype= "Text/css">. Demo{Color:Red!important;Color:Green;}</style><Divclass= "Demo">Www.admin10000.com</Div>
The above code in the FF font is red, IE6 the font is green. Explain the existence of IE6 neglect!important.
Take a look again:
<styletype= "Text/css">. Demo{Color:Red!important; }. Demo{Color:Green; } </style> <Divclass= "Demo">Www.admin10000.com</Div>
If IE6 does not recognize!important, the above code. The contents of the demo should be shown in green, but it is not,. The contents of the demo are shown in red, indicating that IE6 recognizes!important.
The difference between the two cases is: when in a selector, the use of!important to change the style priority, IE6 is not valid, the following style covers the front,!important is completely ignored, using!important hack is the use of this. And when applying!important in different selectors, IE6 recognize!important.
Let IE6 also know!important