position="relative"; and Image menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
pauldixon
Beginner
Beginner
Posts: 5
Joined: Mon Oct 03, 2005 6:51 pm

position="relative"; and Image menus

Post by pauldixon »

I have a main menu imbedded in my HTML code that is image based. I am using the position="relative"; variable in my code in order to make the sub menus appear correctly. When I have this variable turned on the links in my top-level image menu do not work. All I get is a pointer but the rollovers still work but no link. If I create a text link in the menu the link works fine. If I remove the position="relative"; the image links work again.

Does someone know how I can have the position="relative"; and still have the image menu links work correctly?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

The short answer is yes. We need to see a page to figure out what's happening.

Ruth
pauldixon
Beginner
Beginner
Posts: 5
Joined: Mon Oct 03, 2005 6:51 pm

Here is the code

Post by pauldixon »

This is at the top of the page:

<SCRIPT>

fixMozillaZIndex=true; //Fixes Z-Index problem with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=3;


with(mainStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=0;
fontfamily="Verdana, Tahoma, Arial";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
padding=5;
pagebgcolor="#ffffff";
pagecolor="black";
separatorcolor="#999999";
separatorsize=0;
}

with(menuStyle=new mm_style()){
bordercolor="#A0A3A8";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#ffffff";
offcolor="#000000";
onbgcolor="#FFEEE0";
oncolor="#000000";
outfilter="Fade(duration=0.2)";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
padding=10;
pagebgcolor="#ffffff";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
separatorimage="/images/dotted_a0a3a8.gif";
}

with(milonic=new menuname("Level1")){
overflow="scroll";
style=menuStyle;
aI("text=Enterprise / Public Sector;url=/Enterprise/index.htm;")
aI("text=Consumer / LBS;url=/LBS/index.htm;")
aI("text=Automotive;url=/Automotive/index.htm;")
}

with(milonic=new menuname("Level2")){
overflow="scroll";
style=menuStyle;
}
drawMenus();

</SCRIPT>


This is down in the HTML code:

<SCRIPT>

with(milonic=new menuname("Left Nav")){
alwaysvisible=1;
left=0;
top=38;
orientation="vertical";
style=mainStyle;
position="relative";

aI("showmenu=Level1;url=/Home;image=/images/nav_partnerlink_top.gif");
aI("url=/Enterprise;image=/images/nav_enterprise_2nd.gif;overimage=/images/nav_enterprise_2nd_on.gif");
aI("url=/LBS;image=/images/nav_lbs_2nd.gif;overimage=/images/nav_lbs_2nd_on.gif");
aI("url=/Automotive;image=/images/nav_automotive_2nd.gif;overimage=/images/nav_automotive_2nd_on.gif");
aI("url=http://care.teleatlas.com/;image=/images/nav_react.gif");
aI("url=/GeneralLinks/Support;image=/images/nav_support.gif");
aI("url=/GeneralLinks/Contact;image=/images/nav_contact.gif");
}

drawMenus();

</SCRIPT>
pauldixon
Beginner
Beginner
Posts: 5
Joined: Mon Oct 03, 2005 6:51 pm

More Info on this

Post by pauldixon »

If I add another menu item that is a text link it works fine. If I take the above code and put it on a completely clean page with nothing but the menu the links work. I have been over the code several times but cannot find anything that is keeping it from working the way it is now.
pauldixon
Beginner
Beginner
Posts: 5
Joined: Mon Oct 03, 2005 6:51 pm

Somthing in the CSS is causing it to break

Post by pauldixon »

I have traced the cause to the CSS file for the site. Has any one had any similar problems with this?
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Dunno. So many things can interact that it's really next to impossible to figure it out without seeing the page (i.e., URL), as Ruth requested.
pauldixon wrote:Has any one had any similar problems with this?
You said you found a conflict in the CSS. No way we can help with that without seeing it (which a URL would have given us).
John
pauldixon
Beginner
Beginner
Posts: 5
Joined: Mon Oct 03, 2005 6:51 pm

Thanks

Post by pauldixon »

I ended up moving it out of some of the CSS structure of the site and it fixed the problem. Unfortunatly the menu is used on a company Intranet and not accessible from outside the firewall.

Thanks again for your help.

Paul
Post Reply