Fixed position menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Fixed position menus

Post by Columcille »

I'm setting up the menu on an in-house website in which all users are required to use Firefox when accessing the website. As such, I wanted to set the menu position=fixed to avoid having the menu jump around when scrolling. This works - the menu stays in place. But, the submenu's scroll off the screen. :) The main menu remains fixed on the screen as I scroll down a page but the submenu's are fixed to their original location and after scrolling are no longer visible.

Has anyone else played with this? Any solutions? I've just updated to the latest version of the menu and purchased a license so I guess I could contact support directly but I thought I'd toss the question out here first. :)
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

I'm not sure what you mean by fixed. Do you mean you want the menu to stick and the page to scroll by it, kind of like the IE fixed background that never moves but the page scrolls over it?

I don't think you can do that, not that way. You can always use the followscroll, but without actually seeing your page it's kind of hard to figure a solution. Probably there are ways you can get it to do something similar. In order to figure a solution, can you post the html, any css and the menu_data.js file. From that we can put together a page and figure something out for you.

Ruth
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Post by Columcille »

fixed is a CSS tag firefox and others recognize for position. I can set an element position: fixed; and, as you say, it will stay where it is while the rest of the page scrolls. Configuring the menu, I can set position="fixed"; and the menu itself will be fixed in position like I want, but the submenus are all thrown off.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Yes, I thought that is what you meant. As far as I know that is not a property that can be set in the menu. If you look below my name there are some links to property references, one is to menu properties. On that page take a look under position which has an explantion about the property.

Again, this might not serve, since I don't know the layout, but I've seen some who have a menu across the top and the rest of the page is an iframe. So, the page, in the iframe of course, scrolls while the menu remains 'fixed' and the submenus drop over the iframe.

The menu also has a followscroll property which makes it 'follow'

Ruth
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Post by Columcille »

I've used followscroll, but it's jumpy. :) fixed is much nicer. And the menu has a position property, but it does seem the submenus aren't designed to play well with fixed positioning. I tend to avoid iframes, particularly on this website, so I'll just stick with jumpy.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Also, the "fixed" CSS variable is not supported by Internet Explorer. Just thought I'd add this tidbit of information.
Columcille
Beginner
Beginner
Posts: 8
Joined: Thu Feb 09, 2006 3:07 am

Post by Columcille »

Vikenk, noted that in my original post. I have the luxury of being in a situation where all the users will have to use Firefox to interact with the website. This is a project for departmental use, not the greater world, so I'm able to do away with cross-browser concerns.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

Vikenk is right on the fixed and IE, though if no one will ever ever use IE that won't be a problem, and any new version of IE may have that problem fixed.

As to the followscroll=1; you can use the below syntax, putting controls on the followrate and the followspeed.

followscroll="x,y,z"; x being the position from the top you want the menu to stop when the scroll stops, y is the followrate, and z is the followspeed. Followrate is the number of milliseconds between moves of the menu and followspeed is the number of pixels it moves during each movement.

You'll have to play around with the last two numbers, if they are too large the menu will be jumpy.

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

Post by John »

Try this...

Code: Select all

followscroll = "5,10,4";
John
burk3
Beginner
Beginner
Posts: 1
Joined: Thu Feb 16, 2006 1:48 am

Post by burk3 »

I was wondering about the same thing. I've got a good, working IE "fix" for the fixed position issue, and would like very much to have the menu be fixed.

I've tried lots of stuff with css, and got the root menu to stay put, but the submenus keep moving. I would imagine that the submenus are placed explicitly by the menu system each time there is a mouseover, so changing any of the css is futile.

Anyway, I've placed the menu in a div that is fixed in both IE and firefox, and the menu part stays fixed, but the submenus keep moving with the rest of the text.

The test site can be found at http://nutcates.com/moe/

anyway, just my 2 cents
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

Hi All,


I have now created a demo that shows that it is in fact possible to have fixed position objects and fixed position menus with Internet Explorer as well as with Firefox.

The page is at http://milonic.com/fixed_position.php

please note the disclaimers, what we have is a fudge to make it work and I advise that you use it knowing that you may be opening a VERY big can of worms.

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

Post by Ruth »

Hi,

Also, just as another disclaimer, I believe you have to have IE6+ if they get a plus :)

It doesn't seem to work in 5.5

Ruth
User avatar
Andy
Milonic
Milonic
Posts: 3308
Joined: Sun May 19, 2002 8:23 pm
Location: Menu Developer
Contact:

Post by Andy »

That might be because of the lack or DOCTYPE support in that browser. It works in IE7 though so could be future proof, who knows ;)

How come you ain't upgraded to IE6 yet?
Post Reply