Hey I am wondering how I can implement the css selector
for
select every <a>
-Tag except in a div
tag with an id <div id='exclude'>
.
It seems that I have to use the :not()
selector.
CSS Selector div#exclude a
are the links that I don't want
It is not a:not(div#exclude a)
, isn't it?
CSS select every except in
Asked
Active
Viewed 44 times
0
-
You can't really do that. The `:not` selector is referred to the element you are selecting.
– Dekel
Dec 03 '16 at 21:41
-
1
of course you can. [see here](https://jsfiddle.net/d2wqqakt/)
– avrahamcool
Dec 03 '16 at 22:23
-
1
body > a,
body *:not(#exclude) a
{
color: yellow;
}
– scooterlord
Dec 03 '16 at 22:44
Asked
Active
Viewed 44 times
0
-
You can't really do that. The `:not` selector is referred to the element you are selecting. – Dekel Dec 03 '16 at 21:41
-
1of course you can. [see here](https://jsfiddle.net/d2wqqakt/) – avrahamcool Dec 03 '16 at 22:23
-
1body > a, body *:not(#exclude) a { color: yellow; } – scooterlord Dec 03 '16 at 22:44