Forum Moderators: not2easy

Message Too Old, No Replies

CSS2 a href inheritance?

inheritance question on css2

         

toerning

12:22 pm on Jul 24, 2003 (gmt 0)

10+ Year Member



Im making different hovers for different types of links.

So i need to declare a class for each type of link eg.

a.men {
color: #00FF00;
font-family: Verdana, Tahoma, "MS Sans Serif";
font-size: 10px;
text-decoration: none;
}

But it also means, that I have to specify that every single time I want to use that class =( eg.

<a href="http://www.some.com" class="men"....

I would very much like to be able to state that all links in <div class="content"> are for instance blue and have no underline.

I fail to understand if thats possible by reading:

[w3.org...] and the following paragraphs.

In short: "NEED BACKUP" =]

Nick_W

12:26 pm on Jul 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, it's just a matter of selection [w3.org].

If your content div is id'd like <div id="content"> then you could do this:


#content a {
color: blue;
text-decoration: none;
}

With me?

PS: Welcome to WebmasterWorld!

Nick

toerning

12:35 pm on Jul 24, 2003 (gmt 0)

10+ Year Member



THX M8! Nice and fast =)

Works like a charm.