[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 162
  • Last Modified:

nth-child not working out for me!

Okay,
I want to remove the right margin from every 5th image on this page when width is 1035px+:

http://sandbox.intrepidrealist.com/sophie-cooper/series/water-tanks/

I'm using :nth-child(5n+5) to do it and the third is being targeted instead of the 5th. Is there something overriding this or am I doing it wrong?

Thanks!
0
Alicia St Rose
Asked:
Alicia St Rose
1 Solution
 
GaryCommented:
That is not the nth-child as you have other elements in between - use

.fancy-thumb:nth-of-type(5n) {

Open in new window

0
 
Alicia St RoseOwner & Principle Developer/DesignerAuthor Commented:
Thanks Gary!!
You just saved my bacon!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now