Relative Positioning with overflow:scroll

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
t.wood
Beginner
Beginner
Posts: 9
Joined: Tue Jan 24, 2006 2:32 pm

Relative Positioning with overflow:scroll

Post by t.wood »

Hi,

I would like to use relatively positioned menus (inside a table cell) in a div with overflow:scroll. I can't seem to get this to work. At the moment the submenu gets left behind when the div is scrolled. I have created an example here:

http://snow.actofdefiance.co.uk/menus/example4.html

I have tried Firefox 1.5 and Internet Explorer 6. Is it possible to get this working? Any suggestions as to how?

Cheers,

Tim
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

To my knowledge, relative positioning within a table is not compatible with followscroll. You cannot use both commands together.
vikenk
Mega Advanced
Mega Advanced
Posts: 297
Joined: Tue Nov 29, 2005 7:38 pm

Post by vikenk »

Sorry, I misread your post. You said overflow:scroll, not followscroll. Sorry or the misunderstanding.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You have the menu in a table, position="relative"; which is correct. You have the div set to overflow:scroll, so the div scrolls as it should but, the table does not scroll it stays in position and the MenuA stays in the table as it should and the submenu stays with MenuA as it should. If you are looking to have something that scrolls, then menuA should not be in a table, it should be set absolutely with followscroll=1; then the main menu will scroll as the page scrolls and the submenu will open wherever the main menu is at any given point on the page.

I do not know how that will work using a div set to scroll. Have you considered using an iframe there instead with the menu on the page in the iframe using the followscroll in the menu?

Ruth
t.wood
Beginner
Beginner
Posts: 9
Joined: Tue Jan 24, 2006 2:32 pm

Post by t.wood »

Hi Ruth,

Sorry, I don' t understand. In what sense doesn't the table scroll?

When I look at it, as I scroll the div, the table, and its contents including MenuA move (relative to the browser window). But the submenu continues to open in the same absolute place (relative to the browser window), no matter where MenuA scrolls to. Are you seeing something different? Which browser are you using?

Unfortunately I am unable to position MenuA absolutely, because I have no way of knowing where it should be.

I would really like to avoid using an iframe, it shouldn't be neccissary, and would really complicate the rest of the planned functionality of my design.

Thanks for your reply,

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

Post by Ruth »

Hi,

Sorry, I misread what you wrote, I thought you wanted it to followscroll, which is a property in the menu which allows it to scroll down the page as the page scrolls up, which you can't do when the menu is in a table.

I see the problem in FF. You are downlevel on your menu, you need to upload the newest version. The released in 5.742, and there is a pre-release 5.743 which is in the testing stages, you can get them both and see if either fixes the problem. If not, let us know and we'll report it to Milonic.

Make sure you back up your existing 3 program files someplace in case there's a problem with the newer versions and your layout.

Ruth
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

tested it with 5.742, tested different variations of the menu in this application.
It did not work.

Michael
t.wood
Beginner
Beginner
Posts: 9
Joined: Tue Jan 24, 2006 2:32 pm

Post by t.wood »

Hi,

I have tried it with 5.743 pre-release, it also didn't work.

Thanks,

Tim
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

menu in a table which itself is placed in an overflow:scroll div.
I do not think that this will work.

Try placing it within text using the popup menu function positioned by images (though I have doubt if this works, did not test it.).

Sample
http://milonic.com/menusample24.php

Michael
t.wood
Beginner
Beginner
Posts: 9
Joined: Tue Jan 24, 2006 2:32 pm

Post by t.wood »

Hi Michael,

Thanks for the suggestion. I have just had a go at using placement by images but it exhibits the same behavior (the menu is displayed as though no scrolling had occured).

Cheers,

Tim
t.wood
Beginner
Beginner
Posts: 9
Joined: Tue Jan 24, 2006 2:32 pm

Post by t.wood »

Hi Milonic.

Has there been any progress on this issue? Is it unsupported? Is it possible that support for this could be added in the next version?

Cheers,

Tim
Migru
Milonic Guru
Milonic Guru
Posts: 669
Joined: Tue Nov 01, 2005 8:22 pm
Location: Hamburg - Germany
Contact:

Post by Migru »

Hi

if it is really important to find a solution because of required progress of work, so why don´t you make use of an iframe instead ?

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

Post by Ruth »

Hi,

First, the menu doesn't play well being in a div. Since it is made up of divs, spans etc., and browsers seem to treat the divs in various ways with regard to position.... absolute, relative, static, fixed or whatever it might be there can be conflicts. Usually this is in IE for the Mac, but I've seen other problems. This seems to be one of those problems. Now, that may be due to the div, or it may be due to the overflow:scroll, since overflow=scroll is a menu property which allows long menus to become scrollable instead of being really long.

The only solution I found was to use an iframe, I did place it in the div you have, setting the size so it fit inside it and without borders, so you really don't 'see' it's an iframe.

The only other suggestion I have is that you contact Milonic if you have a licensed menu and see if they can give you more detailed information, or if there is some other solution for this.

Just for added information, I don't see this problem in Opera or IE. I don't have other than those and Mozilla so I can't test other browsers, or the Mac OS.

Ruth
Post Reply