sibling-index() and sibling-count() For years, CSS had no way of knowing which position an element had among its siblings, or how many siblings there were. Now it does. With sibling-index() and sibling-count() you can finally get the item index and item count directly in CSS. sibling-index() returns the element's position among its siblings, starting at 1 . sibling-count() returns the total number of siblings, including the element itself. How we used to do it...