How to Force CSS Style to All Children (Recursively to Any Children)
The below CSS code selects all children of an element regardless of how deeply nested they are.
It is done by the use of the asterix (i.e. *) selector, which selects elements of any type.
.classOfParent *
{
font-size: 16px !important;
line-height: 24.2px !important;
}
or maybe even better
#idOfParent *
{
font-size: 16px !important;
line-height: 24.2px !important;
}
It does not work for iframe elements.
Published:
Last modification:
Colorado WebDev - June 18, 2025
Best, simple, working explanation that I found looking up how to do this with my searches
Leave a Comment