need help in mouse hover

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
rajsekar2u
Forum Commoner
Posts: 71
Joined: Thu Nov 20, 2008 4:23 am

need help in mouse hover

Post by rajsekar2u »

Hi,

On hover is not working in IE 6.

Am using the following css do display background color on hover. But its not working on IE6.

Help me.

CSS Code:

Code: Select all

.lmenu5{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:11px;
font-weight:bold;
color:#000000;
background-color:#FFFBFF;
height:23px;
}
.lmenu5 a{
font-size:11px;
text-decoration:none;
color:#000000;
}
.lmenu5 a:hover{
font-size:11px;
background-color:#DEEBFF;
}
.lmenu5:hover{
background-color:#DEEBFF;
border-right: #000000 2px solid;
}
And Html Code

Code: Select all

<table>
<tr>
    <td class="<?php echo $class; ?>">&nbsp;<a href="index.php">Home</a></td>
</tr>
</table>
shotocon
Forum Newbie
Posts: 2
Joined: Thu Jul 16, 2009 8:50 am

Re: need help in mouse hover

Post by shotocon »

hmmm - just a quick attempt at an answer here.

I usually use onmouseover javascript to do this.

Its possible to get a div.[class]:hover to work - but will change the background for the entire width of the div tag. This only seems to work in FF.

Not too sure if its possible to get :hover to work for regular text or a cell though - could be wrong.

I'll keep an eye on this thread, hopefully someone will prove me wrong!
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: need help in mouse hover

Post by pickle »

IE6 doesn't support hovering on anything other than <a> tags, and has absolutely no support for attribute specific styling. I found this link helpful in determining what IE6 does & doesn't support: http://kimblim.dk/css-tests/selectors/.

If you want hovering on something other than <a> tags in IE6, you'll have to use Javascript.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
kaszu
Forum Regular
Posts: 749
Joined: Wed Jul 19, 2006 7:29 am

Re: need help in mouse hover

Post by kaszu »

Flickering can be fixed easily, from ajaxian.com:

Code: Select all

* html {
  filter: expression(document.execCommand("BackgroundImageCache", false, true));
}
Post Reply