Log in

View Full Version : psudo-class within a class?



agentphish
10-27-2008, 06:15 PM
So if I want to define how my links look within a specific DIV which has a class assigned to it how do I do that?

I've tried to add the code into the actual CSS within both the DIV itself and in the class but have had unlucky results each time.

What am I missing?

Thanks!

Medyman
10-27-2008, 07:20 PM
If your markup looks like this:

<div class="link">
<a href="#">Linked Text</a>
</div>

You can style the link like this:

.link a {
color:red;
}