Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:08

Menu not positioning properly - please help!


Poster: mjjackso
Dated: Tuesday September 30 2003 - 23:51:52 BST

I am currently using the most recent DHTML menu 3. The problem that I'm experiencing involves the positioning of the menu when the browser window is resized.

Currently, the menu position is set to "center". As I make the browser window narrower, the menu along with the other web content recenters itself (as they should). However, when the browser window is made smaller than the width of the menu, the menu doesn't stop at the left margin. Instead, it continues to slide to the left, right off the screen! How do I prevent this from happening?

Any help would be much appreciated.

Thanks,
Matt

Proper postioning & rubberband effect


Poster: mjjackso
Dated: Thursday October 2 2003 - 6:33:34 BST

It seems that this problem can be solved by placing the menu within a table cell.

The following code worked:
Code:
<td>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td>
<script>PlaceMenu("mainmenu")</script>
&nbsp;
</td></tr></table>
</td>

Now, the problem is this "rubberband" effect. Does anyone have any ideas on how to make the menu move WITH the other content when resizing the browser window? Right now, when I move the other content, the menu will reposition periodically in order to "catch up" to the new position. How do I make them all move at once?

Thanks,
Matt


Poster: John
Dated: Thursday October 2 2003 - 8:51:11 BST

Always post a URL, as requested, so we can see what's happening and look at all of your code.

Test URL


Poster: mjjackso
Dated: Thursday October 2 2003 - 12:36:14 BST

Here is a test URL:

http://www.youthconference.com

Matt


Poster: Hergio
Dated: Saturday October 4 2003 - 20:13:18 BST

Oh come on now, it looks great the way it is! haha What you are referring to has nothing to do with the menu, but I believe more with your own browser and the rate at which it updates objects on the screen. Most browsers render HTML EXTREMELY fast and they give the effect of 'flowing' objects when you resize pages. But the menu is created with javascript and the browser updates only when there is sufficient time to move around all the menu's items. At least thats what I think. The only other thing I can think of is Andy has a timeout on the menu that periodically checks the size of the window and the position of the menu. If the window is changing, it waits until the window size is the same for two consequtive tests (meaning you've paused the resizing) and so then redraws it. It would be a waste of resources (and javascript timers) to check the menus and windows positions every 5 milliseconds for something that people do for about 0.0001% of the time they are viewing a webpage. ;) So Andy, if its with you, then I'd like to know, otherwise I will assume its the browser choice when to redraw.


Poster: mjjackso
Dated: Sunday October 5 2003 - 5:20:08 BST

Ok, thanks. I guess I was just being too picky.

Matt