Welcome to WebmasterWorld Guest from 50.19.57.50

Forum Moderators: not2easy

Message Too Old, No Replies

Need help with hover

Here is my code

     
5:28 am on Aug 1, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 23, 2003
posts:76
votes: 0


I want to add hover etc to this? WHat is the necessary procedure from here and what do I call the class (meaning, is it different then 'nav')

.nav {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-style: normal;
font-weight: bold;
font-variant: small-caps;
color: #0000FF;
}

Thanks

6:41 am on Aug 1, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:July 5, 2003
posts:167
votes: 0


I think you want something like this:

.nav a {
}
and
.nav a:hover {
}

Is that what you ment?

2:26 pm on Aug 1, 2004 (gmt 0)

Junior Member

10+ Year Member

joined:Dec 23, 2003
posts:76
votes: 0


possibly? Do I then just label the <td class"nav" and it will take care of the rest?
7:25 pm on Aug 1, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 6, 2004
posts:2239
votes: 0


Unfortunately, it's not quite that simple. While Firefox, Mozilla, NS and other compliant browsers will recognize the :hover pseudoclass for many elements, IE, the most prolific (and prolifically bad) browser on the market does not. IE only allows :hover on <a>nchor tags.

That means that if you want your hover effects to work on all browsers, you can only apply them to links. In the example above, if you set up a css rule...

.nav a:hover {
WHATEVER
}

Then added class="nav" to your <td>, the hover would effect any LINKS inside the table cell, but not the table cell itself, and would have NO effect in a table cell without a link in IE browsers.

The only way I know around this IE shortcoming involves javascript, and is therefore a tad unreliable.