Search within TutorialsPark

CSS Pseudo Class Selector :nth-last-child


Selects elements that are the nth from last child of their parent


Definition and Notes.

1. CSS Pseudo Class :nth-last-child selects and styles element which is the nth child of its parent, counting from the last child element..

2. Eg: li:nth-last-child(2) will select second item form the list, counting form bottom to top.


Pattern:

CSS :nth-last-childPseudo Class selector. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note: The value in brackets "n" can be a number, keyword or even a function(formula).


Related Examples.