Menu Riverview Church

NTH-LAST-CHILD

The nth-last-child pseudo-class represents elements that are among An+Bth elements from the list composed of their inclusive siblings that match the selector list S, counting backwards from the end.

If S is omitted, it defaults to *|*.

SYNTAX

selector:nth-last-child(An+B [of S]? ) {
    property: value;
}

EXAMPLES

AN+B

OF S

EVEN

ODD

INTERNAL

first-child

first-of-type

last-child

last-of-type

nth-child

nth-last-of-type

nth-of-type

only-child

only-of-type

EXTERNAL

World Wide Web Consortium (W3C)