Positioning popup() CSS positioned DIV

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
mcarlson
Advanced
Advanced
Posts: 16
Joined: Thu Mar 22, 2007 7:24 pm

Positioning popup() CSS positioned DIV

Post by mcarlson »

I'm having a problem with the popup positioning when called from within a div that is positioned using CSS. You can see the page I'm referring to here: http://www.patmetheny.com/index_2008.cfm. You'll need to view this in a browser other than IE, as the popup doesn't work at all in IE. I'm assuming this is related to the positioning problem I'm having. The menu on the left is a table within a div with the following definition:

#fixedcontent {position: fixed; z-index: 2; top: 0em; left: 0em; width: 210px; height: 100%; padding: 0px; border: 0px;}

This keeps the menu on the left fixed in place when the rest of the page is scrolled. For an example of the issue, roll over the "Listen" button and you will see a popup menu appear. If the page is scrolled all the way to the top, the menu appears where it should, but if you scroll down the page a bit and try again, you will see the popup menu has moved up along with the scrolling content instead of staying locked to the menu. Eventually it disappears off the top of the page completely. The popup menu is being shown using the popup() method, positioning it in reference to the menu image itself:

<a href="/media.cfm?artistid=1" onmouseover="popup('listenMenu', 'listen',-30,210)" onmouseout="popdown()"><img src="images/redesign2008/b_listen.png" id="listen" alt="Listen" width="210" height="30" border="0" /></a>

Any idea how I can get the popup to always appear in the same place in relationship to the menu image rather than scrolling with the page content?
mcarlson
Advanced
Advanced
Posts: 16
Joined: Thu Mar 22, 2007 7:24 pm

Re: Positioning popup() CSS positioned DIV

Post by mcarlson »

Alright, I figured this out. I just included all the js includes within the div itself, rather than in the header.
Now I just need to figure out why it's not working at all in IE.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Positioning popup() CSS positioned DIV

Post by Ruth »

Hi,

Remove the top and left from the style sections, those properties are menu properties only. Then you need to add name= along with the id= in your images for the popup.

Code: Select all

<img src="b_listen.png" id="listen" name="listen" 
and so on. I just tested it on my desktop and it works fine [except for the dojo thing for which it keeps looking :) ]

Hope this helps.

Ruth
mcarlson
Advanced
Advanced
Posts: 16
Joined: Thu Mar 22, 2007 7:24 pm

Re: Positioning popup() CSS positioned DIV

Post by mcarlson »

Perfect, thanks! I thought I had name attributes in there, but clearly I didn't.

By the way, is there a listing of all the possible properties for styles, menus and menu items? I get confused by the Quick Reference Guides on the site. For example, target, text and url are listed as style properties, but aren't they menu item properties?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Positioning popup() CSS positioned DIV

Post by Ruth »

mcarlson wrote:By the way, is there a listing of all the possible properties for styles, menus and menu items? I get confused by the Quick Reference Guides on the site. For example, target, text and url are listed as style properties, but aren't they menu item properties?
No, there isn't one, but I've been working on one for awhile, if life would quit interferring and just let me play around with the things I like to do it might actually be done :lol:

Ruth
mcarlson
Advanced
Advanced
Posts: 16
Joined: Thu Mar 22, 2007 7:24 pm

Re: Positioning popup() CSS positioned DIV

Post by mcarlson »

LOL - yeah, I definitely know how that is ;)
Just wanted to be sure I wasn't missing it somewhere.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Positioning popup() CSS positioned DIV

Post by Ruth »

Hi,

Well, try this. There are items with no explantion because I have no idea what they are :lol: , but at least they're listed and have their corresponding area of use. Will post to Milonic to see if this is correct.....

http://support.milonic.com/beginners/pr ... /index.htm

Ruth
mcarlson
Advanced
Advanced
Posts: 16
Joined: Thu Mar 22, 2007 7:24 pm

Re: Positioning popup() CSS positioned DIV

Post by mcarlson »

Excellent!
Post Reply