The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › CSS › Getting nth-of-type to work for non-siblings?
So basically what I want is something along these lines. It’s a simple concept, and I’m wondering if there’s any sort of way to work around this issue? Perhaps even with a little js?
nth- selectors require the elements to be siblings…..and only select elements…so you can’t select nth-of-class for instance.
Anything more elaborate than that requires JS
Yeah, I saw that before, but Idk how to make the js for this code. His code is different than mine.