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

Sub menus appearing "behind" text


Poster: Ginolard
Dated: Tuesday December 6 2005 - 10:58:56 GMT

How can I stop my submenus appearing "behind" text already present? See screenshot

Image

menus "behind" text


Poster: Migru
Dated: Tuesday December 6 2005 - 11:35:07 GMT

reply: positioning of the menu might be incorrect or the menu call might be wrong organized.....but,

a) your screenshot is not visible, can´t you give an url ?
b) some more information is needed , type of browser, maybe url of menudata file ?

I am sorry please give some more details.

Michael (Migru)


Poster: Ginolard
Dated: Tuesday December 6 2005 - 11:36:58 GMT

This is the image URL http://img205.imageshack.us/img205/3143/milonic6po.jpg

I can't give a link to a website as this is an HTA I'm developing (so the browser will be IE, effectively)

Positioning of the menu.........


Poster: Migru
Dated: Tuesday December 6 2005 - 11:59:10 GMT

how did you do it ?
relative...
absolute....??

placing the main-menu into the form??

Michael (Migru)


Poster: Ginolard
Dated: Tuesday December 6 2005 - 13:24:07 GMT

All of the items on the page are placed using DIV tags with absolute positioning. The Menu code is placed in the HEAD section as it was the only way I could get it to work. I can upload the HTA somewhere if that would help

The menu and <div> tags


Poster: Migru
Dated: Tuesday December 6 2005 - 13:42:36 GMT

Have my own experience with this, I think it is better to get it out of <div>

quote
I have no way to know if it was after that version or before it. The only thing I can suggest you try is get it out of the div and if you have to position it relatively put it in a table instead. As usual, all the browsers out there seem to treat divs differently, especially with regard to position, i.e. relative, fixed, absolute etc. unquote

so - relative positioning /(in a table) seems to be recommended.

The sample for this is:
http://www.milonic.com/menusample9.php

Michael (Migru)


Poster: Ginolard
Dated: Tuesday December 6 2005 - 13:52:55 GMT

Hmm...I just, as a test, removed the "Show machines starting with" element from a DIV and, instead, used <BR> tags to move it down from the top of the screen. Sure enough, the menu now works as it should and goes over the top of the text.

Sigh....I'm going to have to re-write the entire main body HTML code into a table now. Damn it.

Relative Positioning


Poster: Migru
Dated: Tuesday December 6 2005 - 14:10:05 GMT

But thats not complicated at all !

"Cut" the text of the main menu from the rest, but keep one drawmenu() at the end, don´t forget to include the position=relative; instead of top= ; and left= ; properties and keep the submenus, as they are in the file setup just after the <body> tag, and as it is described in the sample.
So there is not so much to do. And - use the latest release !

Michael (Migru)


Poster: Ginolard
Dated: Tuesday December 6 2005 - 15:08:28 GMT

Right, I've sorted that out but now I'm baffled by why the submenus are so far apart (again seen screenshot)

http://img229.imageshack.us/img229/306/managepc140rh.jpg

Incidentally, I am using the standard horizontal menus. I haven't changed any of the style code, I've simply added new menus/submenus

Standard horizontal menus


Poster: Migru
Dated: Tuesday December 6 2005 - 15:28:55 GMT

Hi

standard horizontal menu ........
...please of which sample?

Are there _subOffsetTop = ...; and _subOffsetLeft=...; specified ?
(Global properties, head of menudata.js file)

or may be any "top" and "left" properties within the submenu properties ?
Difficult to say, when the files are not visible.

Michael (Migru)


Poster: Ginolard
Dated: Tuesday December 6 2005 - 15:44:04 GMT

It's the default menu style that comes with the download. It appears to be something to do with the fact that it's an HTA. If I rename the HTA to a normal HTM file it will display the menus correctly. When it's an HTA the submenus are a little too far apart. I can live with it but I'd prefer the menus to be closer together.

subOffsetTop = and _subOffsetLeft= are both specified in the menu_data.js file with values of 2 and -2 respectively.

UPDATE: It seems that these values have to drastically changed when it's an HTA. With the values as they are above the submenus appear some way off to the right and down (as per the screenshot)

With settings of -8 and -25 (!) they appear next to each and nicely aligned.

Menu Style


Poster: Migru
Dated: Tuesday December 6 2005 - 16:03:52 GMT

Its not the "Style" but within the menu properties and global properties, I think. Do you have a license ? May be someone of the team could look after that. No experience with HTAs on my side.
I would say, modify the values of subOffset both to zero (or other values) and find out what happens.

Michael (Migru)


Poster: Ginolard
Dated: Tuesday December 6 2005 - 16:09:47 GMT

I don't have a licence I'm afraid. I am, currently, just experimenting with the menu system and seeing if I can use it to make my HTA look a little more professional.

HTAs appear to be a law unto themselves and I'm wondering why I ever decided to delve into the murky world ;)

Study posts


Poster: Migru
Dated: Tuesday December 6 2005 - 16:24:58 GMT

HI

You can learn a lot, if you just read the posts and relevant replies.
Of course, a little bid targeted to those topics which are interesting for the actual problem. In your case, just read, what you can get on "Margin adjustment" or "positioning of menus, submenus etc."

Michael (Migru)