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

Positioning problem with position:relative

Poster: digitalpacman
Dated: Monday April 7 2008 - 18:52:32 BST


I upgraded to the new version to try using _buildAfterLoad=true but apparently milonic is old school and uses onload= instead of when the DOM is loaded.

So that means if there is a 404 image that hangs your menus dont load.


My problem is that the parent element to where my menu is located there is position:relative. So when it tries doing absolute it sends the submenu flying way off to the side. (its treating the top left of the parent as the top left of the document)

<div id="myid1" style="position:relative;top:0;left:0;margin-top:100px;margin-left:100px;">
  with(milonic=new menuname("m_v3p0")) {
    aI("text=Travel + Gifts;url=;pagematch=[-_]s/35\\.htm$|searchresults\\.asp\\?cat=35$;");

  with(milonic=new menuname("m_v3p1")) {

I am aware that I can put the sub memus OUTSIDE the parent.. and inside the direct child of the body. Well I don't want to do this because its easier to style it this way because I have menu menus.

#myid1 .nav {

#myid1 .nav_hover {

#myid2 .nav {

#myid2 .nav_hover {

If only... if only milonic when looping up the nodelist to the body to get the position just did if computedstyle.position = relative or absolute then set this as the new top left if the children are siblings. if this was a perfect world, I guess.

Anyone have a way around this issue or am I yet again out of my luck?

Re: Positioning problem with position:relative

Poster: Ruth
Dated: Thursday April 10 2008 - 5:26:03 BST

Could you please contact Milonic about this issue. I am not a programmer, I don't even know what you mean by old school of onload instead of DOM.

The only ways I know for the relative positioned to work is either the old method of main separated from subs and the program called after the body tag and before the main menu is load, or the newer buildAfterLoad.

I find most of my solutions by getting the page that is having the problem and experimenting, not from a knowledge base of css, programming or such.