#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    3
    Rep Power
    0

    Making a CSS mouseover layer disappear


    Hello,

    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:
    http://members.rogers.com/pat.turbach/work_layers.html

    (A quick visit here describes my problem way better than my words seem to...)

    Any help would be GREATLY appreciated!

    Thanks,
    Pat
  2. #2
  3. No Profile Picture
    syndicatetech.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    413
    Rep Power
    14
    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.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    3
    Rep Power
    0
    Thanks!

    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.

    cheers,
    Pat
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    3
    Rep Power
    0
    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...
    pat
  8. #5
  9. No Profile Picture
    syndicatetech.com
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Posts
    413
    Rep Power
    14
    Im not familiar with how dreamweaver works, being that i code everything from scratch. I think that programs like dreamweaver are restricting and inflexible.

    To answer your question before, you would have to have a bit of Javascript experience to make this by hand. Ill try to explain it in more detail tommorow.

IMN logo majestic logo threadwatch logo seochat tools logo