RandyLahey RandyLahey - 1 year ago 68
CSS Question

CSS: How to target all elements within a given ID

Instead of doing the following to give a text color to all elements on the page:

* {color: red;}

Is there a way to only apply it to all elements within a certain id? Something like this:

#container * {color: red;}

Answer Source

Actually yes, exactly like you mentioned.

#container * { color: red; }
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download