HomeMenu
Jesus · Bible · HTML · CSS · JS · PHP · SVG · Applications

only-child

Description

The only-child pseudo-class for CSS represents an element that is the only child of its parent.

It is the same as :first-child:last-child or :nth-child(1):nth-last-child(1).

Syntax

selector:only-child
{
    property: value;
}

Examples

1 · CSS

2 · JS