Need a bit of help.
I have a collection list with 30 images. (called 1, 2, 3, etc.)
I want the list ONLY to show images 1, 4, 7, 10, etc.
So I need to hide every 2nd and 3rd image.
I tried with this but it’s not working. (I do not know how to code):
Good job, nth pseudo class is indeed the way to go.
Your first rule will target every other 2 elements, so it breaks already there as it will select 2nd, then 4th… not what you want. Second rule is okay, so you can reuse it and shift it one position. Also let’s use nth-of-type here.
<style>
.ci-images:nth-of-type(3n) {display:none} /* Hides the 3rd element, then the 6th, 9th etc */
.ci-images:nth-of-type(3n-1) {display:none} /* Same rule shifted one position so it starts at 2 */
</style>