Restricted Space for menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Gadget Man
Beginner
Beginner
Posts: 4
Joined: Sun Feb 15, 2004 3:59 pm

Restricted Space for menu

Post by Gadget Man »

I'm just trying out DHTML Menu and everything has gone well so far. I have used the "All Horizontal Menu" sample as my starting point as this is the style I need.

However I need the menu to appear within a specific cell of a table. I have used the "relative" position to get the main menu displayed in the correct place, but the sub-horizontal menus, due to their length, over run the space I want to use. This is mainly because the sub-menu starts beneath the main menu item.

Please look at http://www.acme-internet.com/master.html to see the problem. With the browser at full screen (1024x768) only the "Community" sub-menu overlaps. Reduce the browser size and the "Topics" menu will overlap. This is because the menu assumes the full width of the browser window as its canvas.

I would like to know if:

I can make the sub-horizontal menu be permanently left-justified. Always starting from the same position as it's parent.

or

If I can tell the menu to not extend beyond the current table cell it is in.

or

as a possible enhancement, to define a visible area either by pixels or percentage that the menu will attempt to use.

Are any of these possible?

Cheers,

Gadget Man
Gadget Man
Beginner
Beginner
Posts: 4
Joined: Sun Feb 15, 2004 3:59 pm

Sussed It

Post by Gadget Man »

Ok, looked at the docs a bit harder and realised that left was absolute and not relative as it appeared from looking at some of the samples.

All my sub menus now appear hard left and do not over lap.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I looked at your site, that's a nice setup and use on the menu!

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

Post by John »

The menu does not show at all in Safari.
John
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Yes and no, if you hold the mouse over the menu area, it comes to life, odd though.

maz
Gadget Man
Beginner
Beginner
Posts: 4
Joined: Sun Feb 15, 2004 3:59 pm

Thanks - But need some more advice

Post by Gadget Man »

innkeeper9 wrote:I looked at your site, that's a nice setup and use on the menu!
Thanks :D Simple approach. However things have moved on a bit and the menu no longer performs the way I would like. I have now been asked to centre the page and fix the width of the table to 755 pixels. This means that I cannot rely on a fixed position for the left-hand side of the menu.

Is there any way I can change this left position based on the current browser width?

Cheers,

Gadget Man
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Not sure if I understand the question completely, you could use screenposition="center"; menuwidth="700"; then depending on how you want to place it use itemwidth or set each itemwidth to achieve the correct placement for the submenus.

Regards,
maz
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Well, there's a sample for using screenposition and offsets with some explanations here http://milonic.com/menusample23.php

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

Post by John »

Ruth, you are now the official 'Site Librarian' :!: :D
John
Gadget Man
Beginner
Beginner
Posts: 4
Joined: Sun Feb 15, 2004 3:59 pm

Post by Gadget Man »

Thanks for this. Been busy so not been able to reply sooner...
maz wrote:you could use screenposition="center"; menuwidth="700";
Yep, got it to work. Although now I've restricted the width the menu wraps and makes it look ugly... I'm gonna review the page layout I think...

Cheers,

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

Post by John »

Seeing some things (and not) that I think are a problem...

1. Move the tooltips JS call to after the _data.js call.

2. On the demo page, I see a blue box, but no menu items in it at all. Running up and down this box brings up sub-menus, but they are pretty well scattered on the page.

3. You're at least 3 versions down-level. Upgrade.

4. You have 2 items called "Main Menu" in separate <td> in your HTML. You can onlu use a name once.

5. I'd move the Main Menu code back into the _data.js file.
John
Post Reply