November 18th, 2003, 06:30 PM
Making a CSS mouseover layer disappear
I am working on my website in Dreamweaver (I can't hand-code anything of much use!). I have seven main menu buttons, and each one, on mouseover, shows a layer containing its particular submenu and hides all others. I've got the layers appearing fine, but say this happens: a user is on the page, and they scroll around and see the various submenu layers appearing and disappearing. Then they decide they don't want to visit any of the submenu links. The problem is, the submenu layer that was last activated is still there on the screen, so the user can't see under it. They only way to get rid of it is to activate another submenu layer.
How can I get it so that the user can click on another part of the page to de-activate the submenu layer and see the rest of the page?
A sample of this is posted at:
(A quick visit here describes my problem way better than my words seem to...)
Any help would be GREATLY appreciated!
November 18th, 2003, 07:28 PM
The way I personally would do it, is after the mouseover event, i would use setTimeOut (which you may or may not be familiar with). And have it display for about 15 seconds, then disapear...
or even easier, instead... just use the onmouseout command, and have the layer dissapear after a second or 2 using the setTimeOut command.
And in essence, you could simply do the same thing by putting onclick="runthis()" in your body tag, then the function runthis() can check to see if the layer is visible or not, and if it is, it can hide it that way.
November 18th, 2003, 08:16 PM
That sounds like something I could actually do in Dreamweaver!
Although the runthis() function sounds more elegant, but, not being a point-and-click solution, I'd need step-by-step instructions to use it. Is it something simple enough that you could describe the copy and paste process, or do I actually have to know what I'm doing?
Thanks for your help though. It's the best help I've had yet.
November 18th, 2003, 08:24 PM
OK. I'm in Dreamweaver. And I've got one of my menu buttons selected. How do I get to the setTimeOut command? I can't find it anywhere...
November 18th, 2003, 09:26 PM
Im not familiar with how dreamweaver works, being that i code everything from scratch. I think that programs like dreamweaver are restricting and inflexible.