How do I do this menu positioning?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
eastestuary
Beginner
Beginner
Posts: 2
Joined: Mon Jan 05, 2004 8:42 am

How do I do this menu positioning?

Post by eastestuary »

I want my menus to be offset from the left by 350 pixels, but then take up 100% of the remaining screen by resizing the space between menu items. I have done it with another script (but that script causes problems with by DIV alignment on other pages).

In other words, itemwidth becomes a variable based browser width, so it takes up:

(browserwidth-350)/(# toplevel menu items)

See here: http://www.dba.com.hk/_newsite/

Setting the menuwidth to 100% produces some very undesirable results (it just stretches the table but not the items in them, and does not properly take into account the left margin).

Anyone know how to do it?
Last edited by eastestuary on Tue Jan 06, 2004 3:58 am, edited 1 time in total.
User avatar
timrivera
Super Advanced
Super Advanced
Posts: 31
Joined: Sun Jan 04, 2004 8:21 pm
Location: Metro-Atlanta, Georgia, USA
Contact:

Post by timrivera »

In menu_data.js for "Main Menu" put:

Code: Select all

menuwidth="100%";
left=350;
Tim
eastestuary
Beginner
Beginner
Posts: 2
Joined: Mon Jan 05, 2004 8:42 am

Thanks, but not quite

Post by eastestuary »

That correctly positions it on left, but does not seem to resize the menus across the remainder of the screen.

Also, I am getting some errors on my page.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Have you tried 100% inside a table, to see if that would contain the right margin.

I have the same problem with centered 100%, if the page is made small the menu extends the background off to the right.

Another thing I've seen is div's inside the menu table items, I doubt that would control the overall width though.

That's not much help i know, sometimes another perspective helps.

regards,
maz
User avatar
timrivera
Super Advanced
Super Advanced
Posts: 31
Joined: Sun Jan 04, 2004 8:21 pm
Location: Metro-Atlanta, Georgia, USA
Contact:

Re: Thanks, but not quite

Post by timrivera »

eastestuary wrote:That correctly positions it on left, but does not seem to resize the menus across the remainder of the screen.
Try this, taken from: 100% Width Span Menu discussion:

Code: Select all

menuwidth="100%"; 
itemwidth="100%";
This works as intended in IE6, but in Opera each menu item gets smooshed to be as short as possible.


Tim
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

In looking at the code on the URL you posted, I do not see our product in use. I see a call to coolmenus4.js, which is not us.
John
User avatar
Hergio
Milonic God
Milonic God
Posts: 1123
Joined: Wed Jun 12, 2002 7:46 pm
Location: Rochester, NY

Post by Hergio »

Yeah Coolmenus Beta 4.06 (as per the javascript code comments on your page) is not us. Sorry. :oops:
Dave Hergert
Software Engineer
"Helping to make the menu better, one :?: at a time."
Post Reply