?
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
?
145 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying 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…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month14 days, 10 hours left to enroll

771 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