Wednesday, September 3, 2008

Important Declarations - !important

An Important Declaration is one which has the string !important inserted before the terminating semi-colon of the declaration.
Example: #main {color: black !important;}
An Important Declaration has the highest weight among CSS declarations. An Important Declaration will outweigh inline style declarations and internal stylesheet declarations too.
If more than one Important Declaration targets a particular element, then the more specific selector will be applied.

No comments: