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:





Leave a Comment

Name (use whatever you like), will be published
E-Mail (optional and not required), will not be published

Refresh

Characters of image above and the last character twice:

This websites uses cookies and cookies of third parties for analytical purposes and advertisement. By using our website you agree to that. More information. You can change your choice any time.