Login
From:
CSS Tip: Learn CSS the easy way
(Uncensored)
subscribe
Get the index of an element within its parent
https://css-tip.com/element-index/
links
backlinks
Roast topics
Find topics
Find it!
With CSS, you can use the new sibling-index() function to get the position of any element relative to all its sibling elements. You can also rely on sibling-count() to get the number of siblings.