Menu not positioning properly - please help!

Please note that official support for this menu version has now ceased. There are still plenty of users, though, and the forum is still running. Some of our long-time users may be able to help you out.
Post Reply
mjjackso
Advanced
Advanced
Posts: 10
Joined: Tue Sep 30, 2003 11:36 pm

Menu not positioning properly - please help!

Post by mjjackso »

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
mjjackso
Advanced
Advanced
Posts: 10
Joined: Tue Sep 30, 2003 11:36 pm

Proper postioning & rubberband effect

Post by mjjackso »

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

The following code worked:

Code: Select all

<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
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Always post a URL, as requested, so we can see what's happening and look at all of your code.
John
mjjackso
Advanced
Advanced
Posts: 10
Joined: Tue Sep 30, 2003 11:36 pm

Test URL

Post by mjjackso »

Here is a test URL:

http://www.youthconference.com

Matt
Last edited by mjjackso on Tue Dec 30, 2003 9:50 pm, edited 1 time in total.
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

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.
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
mjjackso
Advanced
Advanced
Posts: 10
Joined: Tue Sep 30, 2003 11:36 pm

Post by mjjackso »

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

Matt
Post Reply