Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:08

Center Submenu


Poster: fergusonkw
Dated: Monday August 10 2009 - 22:57:38 BST

I searched the forums and couldn't seem to find anything, but I'm wondering if it was possible to center the submenu's horizontally off of the corresponding main menu button (which is also horizontal). I don't know how to explain it other than if I had 7 items in the main menu (listed horizontally) and had 3 sub items that corresponded to the main menu - middle item than the 3 menus would be centered off of that main button as follows:

Top Line is the main menu and bottom line is the submenu. The dashes are just placeholders and represent nothing

1234567
---123

The 3 options of the submenu are centered off of the middle button (the one that these 3 submenus correspond to).

Re: Center Submenu


Poster: Ruth
Dated: Tuesday August 11 2009 - 22:07:30 BST

Hi,

This is actually more difficult than it seems it would be. In order for me to try and figure out a way to do it, I actually need to see the data file and a test page with the layout you will be using. Here is a post that gives information on getting the x coordinate from an item in a main horizontal menu in order to have the submenus be set where you want them. viewtopic.php?t=3632

Now, as you'll see it is very involved, well, at least for those who don't know programming or js it is involved. But, there are some other options depending on your layout. For example, if your main horizontal menu is going to be centered in the page using screenposition="center"; then you can use the same thing for the submenus and then they would open at what looks to be the 'centered' position of the menu, but that is because the main menu is also set as centered on the page. The other option, if you are using images, then you should be able to set the submenus based of offsets because you would know the width of the images, so you could add them up and figure out how to set the left offset. So, if you can give me your data file and layout, I could try and figure out if it is possible and if so how to do it.

Ruth