Quote:
Originally Posted by Katsunami
The "!important" value will be the one used, independently of where it appears in the stylesheet. (Maybe it can be overwritten by a later defined, new "!important" on the same element; I don't know that.)
|
You also have to take selector matching into account.
!important on a general selector (like "
div" or "
p") won't be applied if there is a selector that matches better (like the
div#book-columns in the thread). The reason that this works so well is that ID selectors are the most specific, as there can be only one element with that ID on the same HTML page.
So, in this case, it works, but in the general case,
!important can be overridden, depending on where and how it is applied.