child classes - begginer here

liunx

Guest
Hi all,
Just wondering how I create child css formatting. Not sure if my jargen is right so here is my code:

.productsnav {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
font-weight: bold;
color: #333333;
text-decoration: none;
}
.navbar {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bold;
color: #333333;
text-decoration: none;
}
{

I want to be able to add another instance on to these. i.e a hover formatting for navbar, but also a different hover instance for productsnav

I have tried things like .navbar:hover with no luck.
The following formating is what i am after:

[NAVBAR - HOVER]
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: small;
font-weight: bold;
color: #FFFFFF;
text-decoration: underline;
}

[PRODUCTSNAV - HOVER]
{
text-decoration: underline;
color: #FFFFFF;
font-weight: bold ;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
}


Thanks everyone :)Read the specs. (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/selector.html">http://www.w3.org/TR/REC-CSS2/selector.html</a><!-- m -->) :)

You're not using IE6, are you? It only supports :hover on <a> elements.

Get a good browser like Firefox (<!-- m --><a class="postlink" href="http://www.mozilla.org/products/firefox/">http://www.mozilla.org/products/firefox/</a><!-- m -->) or Opera (<!-- m --><a class="postlink" href="http://www.opera.com/">http://www.opera.com/</a><!-- m -->).

P.S. You mean jargon, not jargen.I tried ".[classname]:hover" and it worked this time.
must have had a syntax error or something
i am using firefox v1.0.6 but i also tested it in IE and worked fine.
Thanks anyway
 
Back
Top