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!

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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> 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.