:last-child pseudo-class

Applies one or more styles to the element that is the last child element of its parent element.

Selectors Level 3, Section 6.6.5.7Internet Explorer 9

 

Syntax

selector:last-child {...}

Parameters

selector

A CSS simple selector.

Standards information

Remarks

The :last-child pseudo-class is a structural pseudo-class. Structural pseudo-classes enable selection based on extra information in the document tree that can't be selected using simple selectors or combinators.

See also

Reference
:root
:nth-child
:nth-last-child
:nth-of-type
:nth-last-of-type
:first-of-type
:last-of-type
:only-child
:only-of-type
:empty

 

 

Show:
© 2014 Microsoft