/    Sign up×
Community /Pin to ProfileBookmark

Drop Down Menu Position

I have a drop down menu that has a one level submenu on 5 drop downs, that is written javascript. I works great except for the positioning of it on the window. When the Internet Window is expanded, resized the menu moves on me. I need the menu always centered on the page since the page itself is a centered table.

Currently the positons of the main header menus and the submenus are based on absolute positions (I modified an old one). When I change it to relative function I can get the main header menus to work fine, but when I change the submenus, it moves the rest of the page down. Its like it is expanding the header. (The menu is linked into a header html. Then that header.html is linked to each page.)

Is there anyway to insert the entire menu into a table, position that table by relative, then have the menu absolute positons work off that table instead of the IE window. Or is there a better option to get this menu centered on the page?

Here is a link to the javascript code:
[url]http://www.cityofhastings.org/test2/common/main_menu.js[/url]

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @ltaylor617 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.3,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...