homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

Need help with hover
Here is my code
Daily Sparring

 5:28 am on Aug 1, 2004 (gmt 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;




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

I think you want something like this:

.nav a {
.nav a:hover {

Is that what you ment?

Daily Sparring

 2:26 pm on Aug 1, 2004 (gmt 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)

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 {

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.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved