The :only-child pseudo-class only applies to a child element if it is the only one of the parent.
:only-child
element:only-child { property: value; }