DEV Community

Discussion on: TIL: :not() can be used to select all children of an element

Collapse
 
danburzo profile image
Dan Burzo

The reason why applying .fadeIn didn't work is that it's less specific than img:nth-child(odd). If you change it to img.fadeIn (same specificity as the others) and make sure it's declared after the img:nth-child(odd) in your stylesheet, it should work fine!

Collapse
 
wannabehexagon profile image
ItsThatHexagonGuy

I see, that makes sense. Thanks a lot for reading and for the comment!

Collapse
 
eljayadobe profile image
Eljay-Adobe

Oh... yep. The specificity rules.

(shudder)

Nam!

Sorry, that was my PTSD speaking.