CSS3 :last-of-typeSelectors

Complete CSS Selector Reference Manual

Example

Specify the background color of the last p element of its parent:

p:last-of-type
{
background:#ff0000;
}

Try it Yourself »

Definition and Usage

The :last-of-type selector matches an element that is its parent's last child of a specific type.

Tip:Means the same as :nth-last-of-type(1).


Browser Support

The numbers in the table indicate the first browser version number that supports the property.

Selectors
:last-of-type 4.0 9.0 3.5 3.2 9.6

Complete CSS Selector Reference Manual

other extensions