CSS Question About Nth Type?

I have a series of images on my web page. I want every 2nd image to have a border and all the other images to not.

So I've tried this in my code:img:nth-child(2n){border: 5px solid red;}

But it just doesn't work. However when I replace the '2n' with '3n' then it applies the style to every 3rd image. 

WTF!? This makes no sense! Why is it working with 3 but not with 2?????

Somebody please help.

There are no answers yet.
Be the first to answer this question.