- This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
- The forum ‘CSS’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Hi,
I’ve a question about the pseudo class : not related to this page : https://developer.mozilla.org/en/docs/CSS/:not
The code in this page is:
p:not(.classy) { color: red; }
:not(p) { color: green; }
Some text.
Some other text.
One more text
.
:not(selector) { style properties }
…doesn’t work on any browser. Is it normal? If not, is there any other solution.
Thanks for your answers.
Works for me: http://codepen.io/Paulie-D/pen/AHlIm
Saw this the other day: http://www.sitepoint.com/css3-video-tutorial-not-selector/
The` :not` selector works as intended if you assign a context to it, if no context is defined it will attempt to select every element in the DOM. See the following example which shows setting `body` as the context ensures the pseudo selector works as intended.
http://codepen.io/ChrisUpjohn/pen/c46034882595a266ba90b60bba1bac76
That’s… counter intuitive.
>setting body as the context ensure the pseudo selector works as intended.
Useful. Thanks very much.
@Paulie_D: thanx for searching.
@SgtLegend : thanx, exactly what I was looking for.
@CrocoDillon : I agree with you…