homepage Welcome to WebmasterWorld Guest from 54.161.155.142
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
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




msg:1202096
 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;
}

Thanks

 

Aberdeen




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

I think you want something like this:

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

Is that what you ment?

Daily Sparring




msg:1202098
 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?

createErrorMsg




msg:1202099
 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 {
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.

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