i would like to deselect and #id item from a selection without changing HTML or adding any classname,
lets say i want to emulate this Jquery sentence in CSS
$('img').not('#thisone').CSS();
is it possible?
i would like to deselect and #id item from a selection without changing HTML or adding any classname,
lets say i want to emulate this Jquery sentence in CSS
$('img').not('#thisone').CSS();
is it possible?
Use CSS3's :not()
selector (which has an equivalent jQuery selector):
img:not(#thisone) {
}
If you need better browser support, there's always the fact that ID selectors, being the most specific simple selectors, are good for overrides:
img {
/* All images */
}
#thisone {
/* Revert styles for this particular image */
}
Check out this post on the :not selector in CSS3
This might help http://www.w3.org/TR/css3-selectors/#negation
(Jquery does that internally anyway, I think, didn't check, though).