nth-child not working out for me!

Posted on 2014-08-10
Last Modified: 2014-08-10
I want to remove the right margin from every 5th image on this page when width is 1035px+:

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?

Question by:Alicia St Rose
    LVL 58

    Accepted Solution

    That is not the nth-child as you have other elements in between - use

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

    Open in new window

    LVL 7

    Author Comment

    by:Alicia St Rose
    Thanks Gary!!
    You just saved my bacon!

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
    In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    8 Experts available now in Live!

    Get 1:1 Help Now