Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:14
Relative Positioning with overflow:scroll
Poster: t.wood
Dated: Monday February 13 2006 - 19:06:51 GMT
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
Poster: vikenk
Dated: Tuesday February 14 2006 - 0:23:54 GMT
To my knowledge, relative positioning within a table is not compatible with followscroll. You cannot use both commands together.
Poster: vikenk
Dated: Tuesday February 14 2006 - 0:25:52 GMT
Sorry, I misread your post. You said overflow:scroll, not followscroll. Sorry or the misunderstanding.
Poster: Ruth
Dated: Tuesday February 14 2006 - 4:39:47 GMT
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
Poster: t.wood
Dated: Tuesday February 14 2006 - 12:47:46 GMT
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
Poster: Ruth
Dated: Tuesday February 14 2006 - 15:43:03 GMT
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
Poster: Migru
Dated: Tuesday February 14 2006 - 19:51:35 GMT
Hi
tested it with 5.742, tested different variations of the menu in this application.
It did not work.
Michael
Poster: t.wood
Dated: Wednesday February 15 2006 - 12:03:35 GMT
Hi,
I have tried it with 5.743 pre-release, it also didn't work.
Thanks,
Tim
Poster: Migru
Dated: Wednesday February 15 2006 - 12:27:07 GMT
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://www.milonic.com/menusample24.php
Michael
Poster: t.wood
Dated: Wednesday February 15 2006 - 18:43:04 GMT
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
Poster: t.wood
Dated: Thursday February 16 2006 - 11:41:15 GMT
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
Poster: Migru
Dated: Thursday February 16 2006 - 19:22:19 GMT
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
Poster: Ruth
Dated: Friday February 17 2006 - 5:56:33 GMT
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