View Single Post
Old 08-05-2013, 04:53 AM   #19
Rev. Bob
Wizard
Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.Rev. Bob ought to be getting tired of karma fortunes by now.
 
Rev. Bob's Avatar
 
Posts: 1,760
Karma: 9918418
Join Date: Feb 2013
Location: Here on the perimeter, there are no stars
Device: Kobo H2O, iPad mini 3, Kindle Touch
In theory, !important should trump any other CSS rule of equal or lower specificity, but be overridden by CSS of higher specificity. Thus, an !important style on "body p img" will overrule any conflicting style on "p img" or "body a img" but will submit to "body p a img" or "body p img.special" (both more specific). Given that the image in question is assigned the ID of "x", rules applied to "#x" should trump everything else, as an ID-level rule is as specific as it's possible to get.

That's from memory, as I try to structure my CSS so that it cascades properly without relying on !important, but I'm reasonably confident that it's right.
Rev. Bob is offline   Reply With Quote