CSS styling links using id's and classes

class, css, styling

Solution

Heres how to do it to all links I believe it should work:

#logo a:link,
#logo a:visited,
#logo a:hover {
   color: black;
}

Problem

Is there a way of styling links using a id or a class without having to create a new selector for each individual element? for example something like this or close to this would be preferable ``` #logo { a: link {color: black} a: visited{color: black} a: hover{color: black} } ``` However, the above syntax does not work instead all i can find is ``` #logo a:hover { color: black; } ``` #logo a:visited { color: white } I feel like there's an easier way than this.

Original source