...

View Full Version : :hover for a table row?



NeoMoon
11-12-2008, 09:09 PM
Okay, so I'm trying to add a <tr> (row) rollover for my table on a database search. I've tried adding a .className:hover { background: #color; } and then applying that class to the tr element, but that didn't seem to work.

Any suggestions/helpful code snippets?

Thanks in advance,
NeoMoon

coreyvf
11-12-2008, 09:15 PM
tr.classname:hover{background-color: #color}

I don't know if this works in IE, though.

Apostropartheid
11-12-2008, 09:15 PM
Can we have a link?

brazenskies
11-12-2008, 09:16 PM
I think that will only work in FF, have you tested in both FF and IE?

coreyvf
11-12-2008, 09:20 PM
You may need to use the whatever:hover file (http://www.xs4all.nl/~peterned/csshover.html) or try to download some javascript file from somewhere like Hotscripts.com in order to get this to work in IE.

NeoMoon
11-12-2008, 09:26 PM
Can we have a link?

http://neo-moon.com/ItemLookup.php

And thanks for the responses guys.. I'm going to test those out real quick. ;-)

gnomeontherun
11-12-2008, 09:36 PM
:hover on rows does not work in IE6. :hover only works on anchors in fact for IE6, and I think its support is still a little bit spotty in IE7.

Really I think without doing some very creative (and rather annoying) markup tricks, Javascript is really the simplist way to solve this conundrum.

Here is an example of a js script designed to enhance IEs ability to handle things like :hover.

http://code.google.com/p/ie7-js/



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum