Menu following scroll (and I don't want it to float)

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
davebarnes
Super Advanced
Super Advanced
Posts: 71
Joined: Tue Nov 18, 2003 6:09 am
Location: Denver, CO USA
Contact:

Menu following scroll (and I don't want it to float)

Post by davebarnes »

I installed Milonic Menu 5.722 on http://www.kokias.com because I need a menu that would have the submenu items display on top of an iframe.
This version did the job.

But, using FireFox 1.03 on Windows, the menu floats down the page as you scroll down the page.

See: http://www.kokias.com/English/Products_ ... Photo.html

How do I prevent this?
Can you point me to the documentation about this effect?

thanks,
dave

P.S. I have this code: followscroll="0"; in my menu style.
Dave Barnes
sitting in my basement with my iMac
+1.303.744.9024
http://www.marketingtactics.com
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Hey Dave -

The final of .722 came out yesterday. Give that a try while I'm looking at your code.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

It does the same thing in Netscape, so probably any Mozilla browser [if there are more of them].


Ruth
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

It's not really 'floating' like a scrolling menu. It's just stuck in place, rather than following the rest of the page.
John
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

John is right... it doesn't have to do with the followscroll property. Rather, the behavior in mozilla browsers is caused by css fixed positioning. I noticed this when I was working on the code for frames. The fixed positioning in the frames tests (actually a desirable effect there) seemed to come and go with recent updates, so I checked the version info page. It seems that fixed positioning in mozilla browsers is also related to having the menus display above iframes and other embedded objects. According to the version info,

v5.719:
Removed the use of "fixed" positioning by default on Mozilla based browsers. This means that the menu will sit behind Flash and Java Applets so you'll need to declare position="fixed"; for all sub menus that you want to appear on top of HTML Objects
v5.720:
Fully reinstated position="fixed" code for Firefox. By default, menus are now positioned absolute in all browsers.
v5.722:
Added new global property fixMozillaZIndex - Set to true with fixMozillaZIndex=true; will enable menus in Firefox and other Mozilla based browsers to sit on top of IFRAMES, Flash and other HTML Objects
(So it seems it's an option now). It looks to me like fixed positioning must be necessary to make the menus sit on top of embedded objects. So there's a catch-22 here.

Dave,

Since its a global property, it looks like fixMozillaZIndex applies to all menus. So, if you have fixMozillaZIndex set to true (as you do in your MainMenu_data.js file), then all menus will be set to fixed positioning by default, so that they can sit above embedded objects. I say "set by default", but I'm wondering if you can override this on a per-menu basis with the position menu property. First, according to the version info blurb, fixmozillaZINdex is a global property, not a menu style property. So you should remove it from your menuStyle and your submenuStyle, and put it at the top of MainMenu_data.js with the other globals (e.g., with _subOffsetLeft). Second, to try to override the effect for your main menu, try setting position="absolute"; in the Main Menu.

If that doesn't work, then we coould try rawcss or onclass/offclass.

Good luck,

Kevin
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Thanks for the indepth, Kevin. With fixMozillaZIndex=true; moved to the global property area, and removed from the styles sections, the menu no longer 'scrolls' in my Firefox 1.0.2 nor in Netscape 7.1

Ruth
Last edited by Ruth on Fri May 20, 2005 9:47 pm, edited 1 time in total.
ShawnO
Super Advanced
Super Advanced
Posts: 35
Joined: Wed Aug 11, 2004 9:34 pm

Post by ShawnO »

Just a me too message... :)

I put in the update this morning .722 to fix a problem with flash overlapping some pages. Now the menus are fixed on the screen instead of scrolling off as the page moves. It would be nice to have both (above the flash and move off the page as the page scrolls). :)

Shawn
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Did you place the fixMozillaZIndex=true; at the top in the area that has _subOffsetLeft= and so on? That fixed the problem of the menu acting as if it were glued to the 'screen' [that's the only way I can think to describe it, like it was fixed on the outside of the page on the browser screen] instead of being on the page.

Ruth
ShawnO
Super Advanced
Super Advanced
Posts: 35
Joined: Wed Aug 11, 2004 9:34 pm

Post by ShawnO »

Hi Ruth,

That's actually the problem that is making it fixed. If I have the line included, then it is 'glued' to the screen. When I remove it, it scrolls off the page when the page scrolls (as it should).

I would post an url, but it is still internal and can't be accessed from the internet.

Thanks,
Shawn
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I know that Dave's worked when I put that code in and used Firefox 1.0.2 and Netscape 7.1, and IE and Opera worked as usual.

If you can't put it on the web as a test page, could you post the code here for the page and the menu data file so we can see what's going on?

Ruth
User avatar
davebarnes
Super Advanced
Super Advanced
Posts: 71
Joined: Tue Nov 18, 2003 6:09 am
Location: Denver, CO USA
Contact:

Post by davebarnes »

Still have undesirable behavior at http://www.kokias.com/English/Products_ ... Photo.html

fixMozillaZIndex=true; was made a global property and removed from the menu styles
Dave Barnes
sitting in my basement with my iMac
+1.303.744.9024
http://www.marketingtactics.com
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

:oops: I must have moved it and then forgot to save the page. I just looked again and there's no fixMozilla in it. That must be why it works!

Ruth
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Dave,

I tried the position="absolute" idea in an attempt to override fixed positioniong of the main menu. Didn't work. I think Andy will have to do do some tweaking. I will email him.

Kevin
ShawnO
Super Advanced
Super Advanced
Posts: 35
Joined: Wed Aug 11, 2004 9:34 pm

Post by ShawnO »

Has anyone come up with a solution to this problem yet?

Thanks,
Shawn
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

ShawnO wrote:Has anyone come up with a solution to this problem yet?

Thanks,
Shawn
Not as far as I can tell, but see this thread for a possible work-around.

Kevin
ShawnO
Super Advanced
Super Advanced
Posts: 35
Joined: Wed Aug 11, 2004 9:34 pm

Post by ShawnO »

Ok,

Here is what fixed it for me! :) I used the 5.724 Pre-release and also added the following to the flash:

<PARAM NAME="wmode" VALUE="opaque">
and in the <embed> tag, I added wmode="transparent"

With the 5.724 you don't need to use fixMozillaZIndex either.

With the information that Andy gave to me about the parameters and the 5.724 everything works 100%!

Shawn
Post Reply