Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

using layers for navigation? Having trouble with links when OnMouseOut - how can I get them to stay?

Posted on 2005-02-27
6
Medium Priority
?
152 Views
Last Modified: 2010-04-25
I may be doing this all wrong, but I have a main menu running horizontally across the top of the page with a sub menu running directly below it - this sub menu needs to swap out depending upon which of the upper links you roll over. But it's not your typical fly-out menu - - Probably easiest if you just take a look: http://www.toolboxmedia.com/CCLI/index_template2.html

I did have OnMouseOut's for all these but then you couldn't even get to the sub links.

How would you suggest I build this? Unfortunately I'm in a huge hurry and hope that I haven't already wasted a bunch of time going down this road :-)

Thank you so much!
sock2me
0
Comment
Question by:sock2me
  • 3
  • 3
6 Comments
 
LVL 8

Expert Comment

by:alexhogan
ID: 13419470
Having an onMouseOut behavior is what's causing you problems because you have it on the wrong layer.  If you put the onMouseOut behavior on the submenu layer then you will have better luck.

What you want to do is hide the submenu when you either mouse out of the menu area or are on another menu choice.  So on your main menu items you will want to have the submenu visible only when you are over a selection.

Place another layer that covers the bulk of the content area and set a behavior to hide all the submenus.
0
 

Author Comment

by:sock2me
ID: 13422236
Thank you alexhogan,
But can you add a behavior to a layer itself, or do I attach the behavior to each of the text items in that layer?

I have seven submenu layers (one for each main Link), so your answer sort of confuses me.. can you elaborate just a tad?

Thankyou!!!
-Sock2me
0
 
LVL 8

Expert Comment

by:alexhogan
ID: 13422602
[snip]
I have seven submenu layers (one for each main Link), so your answer sort of confuses me.. can you elaborate just a tad?
[/snip]

Sure..,

You can add a behavior to a layer directly, in this case, using the show layer behavior.

On your page you have the seven menu items and seven corrisponding submenu layers.  You'll place all of the submenu layers at the same x&y coordinates and set all of their visible properties to false.  (a closed eye in the layers tab)

Underneath the submenu area place another layer that covers the entire remaining page.  Do not put any content in this layer.  It is for a roll out behavior.  Name this layer 'CatchAll'.

For menu item one assign the show layer behavior to;
Show submenu one
Hide submenu two
Hide submenu three
Hide submenu four
Hide submenu five
Hide submenu six
Hide submenu seven

For menu item two assign the show layer behavior to;
Hide submenu one
Show submenu two
Hide submenu three
Hide submenu four
Hide submenu five
Hide submenu six
Hide submenu seven

Do this for the remaining menu items three through seven showing the respective submenus and hiding the rest.

On the 'CatchAll' layer assign the show layer behavior;
Hide submenu one
Hide submenu two
Hide submenu three
Hide submenu four
Hide submenu five
Hide submenu six
Hide submenu seven


0
[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

 

Author Comment

by:sock2me
ID: 13422809
I love you!
0
 

Author Comment

by:sock2me
ID: 13425094
Looks just like I needed. Thanks! I've been reading the posts for centering a layer - even downloaded an extention for doing this - but for some reason, it doen't work with my layers. - and my layers look different from the layers other folks are talking about in their posts - for example, I don't just have <div id=> I've got a huge hunk of code:
<div id="Subs for Menu Link One" style="position:absolute; left:212px; top:114px; width:604px; height:14px; z-index:2; visibility: hidden;" class="submenu">

(my submenu style is only controlling the ahref text) I've got all the other tables on the page centered and need these layers to center too. Any suggestions?

Thank you, and let me know if I should post this somewhere else. I really appreciate your help. Do you get extra points for helping me again?
0
 
LVL 8

Accepted Solution

by:
alexhogan earned 2000 total points
ID: 13429259
[snip]
Do you get extra points for helping me again?
[/snip]

Only if you post another question.  You'll have to resolve this question first though.

[snip]
I've got all the other tables on the page centered and need these layers to center too. Any suggestions?
[/snip]

You can either position the div tags in relation to the tables or center them on their own.

<div align="center> // will center the content in the div
    <div></div>  // will center this div on the screen
</div>
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month10 days, 17 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question