user765368
user765368

Reputation: 20346

css selectors all elements inside a certain div

I want to retrieve ALL input type checkbox that are not inside a div that has a class that starts with 'xyz_'

How do I write a css selector for the above?

Upvotes: 0

Views: 1852

Answers (2)

Valli69
Valli69

Reputation: 9902

use div:not([class^="xyz_"]) input[type="checkbox"]{ ... }

see working example http://jsfiddle.net/Sz3zY/

Upvotes: 3

spatar
spatar

Reputation: 561

*:not(div[class^="xyz_"]) input[type="checkbox"] { ... }

Upvotes: 2

Related Questions