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:34

Position of menu in relation to a div


Poster: dhnriverside
Dated: Wednesday August 31 2005 - 9:52:02 BST

Hi guys

I'm currently working to implement the Milonic menu in an intranet application I'm building.

I've picked the Context Menu sample (probably the wrong one to be fair). I actually wanted a menu when you click a div. Anyway, I've got it to only work on that div, and on the left mouse button, but I'm struggling with the positioning.

I've got the left and itemwidth properties sorted, but I want the height to be the top (so mydiv.top) minus the height of the menus?

Unfortunately I can't just work it out, as I'm not sure how far down the div will be!

Any ideas?!

Cheers


Dan


Poster: John
Dated: Wednesday August 31 2005 - 14:56:45 BST

Typically the menu does not like being cooped up in a div. Strange and unwanted things happen...

Got a URL (as requested)?


Poster: dhnriverside
Dated: Wednesday August 31 2005 - 15:17:32 BST

No URL, it's an intranet site, sorry.

I'm not trying to put the menu in the div. Basically the idea is the div is setup to look like a button at the end of a page, and when u click it, i want the menu to appear on top of the button, but of course the menu is larger than the button.

So all I'm trying to do is set the left/top properties of the menu so that I can position it.

so

with(menu) {
left = 2; //aligns with button
top = div.top - height of menu

How do / can I use document.feedback with the top property of the menu, it just seems to ignore it.

Cheers


Dan


Poster: Ruth
Dated: Wednesday August 31 2005 - 16:58:23 BST

Hi,

Since you're on an intranet, could you post the page code here and show us how you have the menu set up? That's for me, I'm not good with visualization, but usually I can figure something if I have the page.

Not being sure what you are doing, have you considered using a pop up menu? You can position those based on an image and set offsets from the image allowing you to position it to open exactly where you want it.

I don't know if these will help.

Methods and Functions info

Using the pop menu function positioned by images


Poster: Ruth
Dated: Wednesday August 31 2005 - 17:25:49 BST

:oops: On that link for methods and functions, you are looking for the pop function down toward the bottom which talks about positioning the menu when using that pop function.

Ruth