Get the second last child of an element in CSS

In order to query the second last child of a HTML element in CSS, you can just simply use this:

.my-menu:nth-last-child(2)

assuming .my-menu is the class name of the parent node.


Comments