nth Child Theme Issue — Live Chat



we’re trying to get the new 3-per-row layout to adjust using nth-child(Xn @PatrickCohen (continued from live chat)

  • Ash
    • WordPress Hacker

    Hello @signed_up

    I hope you are well today and thanks for asking the question.

    Do you have a live site that I can check the link? It is very difficult to check with just two files. Please share me a link and explain the issue a little bit, I will try my best to solve the problem.



  • signed_up
    • The Crimson Coder

    Actually, nope. It’s all local currently. It’s a HTML template we’re modifying though, so the two files should do the trick. I think @patrick Cohen had it going before in the chat but not quite there yet (just a continuation). Basically what we’re trying to do is make each row have the same orientation and then alternate.

  • Patrick
    • Support Monkey

    Hey there @signed_up

    I hope you had a great weekend!

    Sorry for the delay here; I was away for the weekend visiting with family.

    Not being able to test with the actual theme, and having to rely on the demo, I believe the following CSS should work to get the images in every 2nd row to align to the right:

    .personal-profiles > article.personal-profile:nth-child(3n+4) > .image, .personal-profiles > article.personal-profile:nth-child(3n+5) > .image, .personal-profiles > article.personal-profile:nth-child(3n+6) > .image

    Remember we had already added the CSS required to get 3 images per row instead of 2, and had tweaked the inner elements to fit.

    Please let me know if you still need help getting things looking smart on smaller screens too. We’ll fiddle with the media queries for that if need be.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.