Search within TutorialsPark

CSS Pseudo Class Selector :last-child


Selects elements that are the last children of their containing elements


Definition and Notes.

1. Use this Selector to apply CSS styles to last child of however many children a element may contain.

2. Eg: li:last-child will apply CSS style to last child of however many children the parent element may have.


Pattern:

CSS :last-child Pseudo Class selector. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note: It can be used to apply a seperate style to last child of any element.

Related Examples.