Topic: Horizontal Menu/Submenu help needed!  (Read 2009 times)

Pages: [1]   Go Down

#1: 12-Dec-2005, 02:34 PM

Coding Team

Bravado
Posts: 1,125

"I can learn to resist anything but temptation..."

WWW
Ok, here's the scoop...I need to create a CSS based horizontal menu with horizontal submenus directly underneath.  An example of how it might work can be seen here:

http://www.alistapart.com/d/hybrid/hybrid-4.html

However, there's a problem with this implementation that I need to find a fix for.  What I need is for the submenus to dynamically appear more centered under each main menu item.  So in the case of the example above, if a user clicks on Renaissance then the submenu would appear aligned to the left just under the menu item...if a user clicks on Digital, then the submenu would appear right-aligned just under it's menu item...and anything inbetween would be more centered under its menu item and aligned a little more to the left or right without going over the right or left boundaries.  Does that make sense?  Basically I want to get away from having everything plush left for the submenu...but I don't want them simply aligned directly underneath it's main menu item due to the fact that if a submenu has a few items then the far right menu item would cause them to overlap to the right a bit.

Hopefully this is pretty clear.  I'm assuming that some javascript would be needed to make this work...so any links or tutorials or whatnot anyone knows of that will help would be greatly appreciated!  Smiley

Thanks a bunch!

Jeff
Jeff Whitfield

"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
—Eddie Izzard

#2: 12-Dec-2005, 02:36 PM

Foundation

rthrash
Posts: 11,647

WWW
Try here if that's what I'm thinking you mean: http://positioniseverything.net/css-dropdowns.html
Please help us help you when asking for assistance.
Ryan Thrash
MODx Co-Founder
MODx Revolution
Your Content, Your Way.

#3: 12-Dec-2005, 03:21 PM

Coding Team

Bravado
Posts: 1,125

"I can learn to resist anything but temptation..."

WWW
Attached is an example of what I mean.  Notice the alignment of the submenus?  Basically they are aligned in relation to it's respective menu and don't go outside the left and right boundaries of the menu.  Compare it to the way it's implemented here:

http://www.alistapart.com/d/hybrid/hybrid-4.html

If I can figure this out I'll be happy as a lark!  LOL!



* hor_menu_sub.jpg (115.4 KB, 817x661 - viewed 237 times.)
Jeff Whitfield

"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
—Eddie Izzard

#4: 12-Dec-2005, 03:22 PM

Foundation

rthrash
Posts: 11,647

WWW
It's not a well known fact, but the common field Lark is the only species in the avian fauna that suffers from chronic depression... how ironic is that!
Please help us help you when asking for assistance.
Ryan Thrash
MODx Co-Founder
MODx Revolution
Your Content, Your Way.

#5: 12-Dec-2005, 10:03 PM

Coding Team

sottwell
Posts: 12,660

WWW
I found a couple of DOM and DHTML solutions, this discussion looked interesting

http://www.milonic.com/mfa/2005-October/006561.html
How MODx Works
Log in to an Evo Manager username guest, password guestuser.

#6: 13-Dec-2005, 02:15 AM

Moderators

MadeMyDay
Posts: 973

WWW
Possible with plain CSS (for browsers, IE needs some code loaded):

http://www.aplus.co.yu/adxmenu/examples/

See the last example, this could fit your needs.

Greetz Marc

#7: 13-Dec-2005, 11:37 AM

Coding Team

Bravado
Posts: 1,125

"I can learn to resist anything but temptation..."

WWW
Possible with plain CSS (for browsers, IE needs some code loaded):

http://www.aplus.co.yu/adxmenu/examples/

See the last example, this could fit your needs.

Greetz Marc

This is probably closer to what I want.  However, notice that the submenu is left aligned directly underneath it's respective menu.  What if the last menu item has, say, five to ten submenu items?  Will the submenu stretch across to the right outside a reasonable page boundary?  There lies the problem and what I'm aiming to fix.  There's got to be a script or something that will dynamically place the submenu underneath it's menu so that it does not go outside a given boundary.

Man...this is making my brain itch!  LOL!
Jeff Whitfield

"I like my coffee hot and strong, like I like my women, hot and strong... with a spoon in them."
—Eddie Izzard

#8: 13-Dec-2005, 12:21 PM

Foundation

rthrash
Posts: 11,647

WWW
Use the DropMenu snippet to call, and use the builtin support for adding a class of "last" to the last item of each row. Revise your CSS accordingly.
Please help us help you when asking for assistance.
Ryan Thrash
MODx Co-Founder
MODx Revolution
Your Content, Your Way.
Pages: [1]   Go Up
0 Members and 1 Guest are viewing this topic.