Other contributors have said "Using CSS how can you select all elements nested within a class?" is the same question as "How do you define attributes for all the elements with one specific class using CSS?" If you believe that these are not asking the same thing and should be answered differently, click here

How do you define attributes for all the elements with one specific class using CSS?

Answer:
Try this technique:



.class

{attribute:value; attribute:value;}



This will effect any element with the class name .class.

That means img.class, a.class, and div.class, for example, would be effected.

First answer by ID1143970107. Last edit by Twiyp. Contributor trust: 190 [recommend contributor recommended]. Question popularity: 5 [recommend question].