Not CSS selectors

With current browser CSS support, you can’t.

Newer browsers now support it- see Sam’s answer for more info.

(See other answers for the alternatives in CSS.)

If doing it in JavaScript/jQuery is acceptable, you can do:

$j(':not(.classname)>input').css({background:'red'});

Leave a Comment