Jump to content

[SOLVED] Hover works in firefox but not explorer


jeff5656

Recommended Posts

I have a CSS to have drop downs appear when the mouse hovers.  However, it only works in firefox and not IE!  I have no idea how to debug a problem that works in one browser but not the other.

 

The link is http://hfhpulm.com/fellowship/manual.html and I am referring to the "rotation description"

 

You can view source; does anyone need the CSS file?  Let me know.  Thanks in advance!

Try this:

 

in your body modifier(if you dont have one, create one in your css file), add:

behavior: url (scripts/csshover.htc);

 

so it should look like

body {
behavior: url (scripts/csshover.htc);
}

 

of course, you can have other stuff in the body modifuer, but pyt the behavior part in there and see if it works

I believe behaviors only work in IE, though I could be wrong as I never use them, as they are a HUGE drain on system resources (they re-calculate everytime you move your mouse/scroll/resize the screen or do anything).

 

You should google 'suckerfish dropdown menus'. They have a good CSS only drop-down menu system that will be much more efficient.

I followed the suckerfish suggestion and it worked.  Just in case others care to know, I kept the css file the same; all I did was add this bit of javascript to the HTML file:

<SCRIPT>
<!-- 
sfHover = function() {
var sfEls = document.getElementById("nav").getElementsByTagName("LI");
for (var i=0; i<sfEls.length; i++) {
	sfEls[i].onmouseover=function() {
		this.className+=" sfhover";
	}
	sfEls[i].onmouseout=function() {
		this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
	}
}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);
-->
</SCRIPT> 

This suggestion solved my problem also. Thank you.

I believe behaviors only work in IE, though I could be wrong as I never use them, as they are a HUGE drain on system resources (they re-calculate everytime you move your mouse/scroll/resize the screen or do anything).

 

You should google 'suckerfish dropdown menus'. They have a good CSS only drop-down menu system that will be much more efficient.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.