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

Problem with absolute positioning


Poster: the_last_tamurai
Dated: Tuesday March 18 2008 - 9:04:34 GMT

Hi everybody,
I've a page with two menus, one put inside a table,and the second in a div with absolute position and it's a multi-level menu,
The problem is every sub menu is separated from its parent with the same distance as the div position from the top left of the page.
I made the menu in a separated file and put it in a div with the absolute position Like :
Code:
<div id="left_menu_1" style='position:absolute;top:345px;left:210px;display:none;'>

and then include it in my page
what is the problem with that
i.e. : the previous result is in IE but in firefox it works fine except the first sub menu, it comes over the parent menu.???!!!!

Re: Problem with absolute positioning


Poster: Ruth
Dated: Tuesday March 18 2008 - 18:08:06 GMT

Hi,

The problem is the absolute positioning of the div. If you'd provide a page we could try and see if there's any solution. Without the page with all the coding there's no way to do anything but make a lot of guesses.

Ruth

Re: Problem with absolute positioning


Poster: the_last_tamurai
Dated: Wednesday March 19 2008 - 15:32:45 GMT

Ok thanks Ruth for your response ,
Look, I have "header" php file, and another file which make the query from the database to make the multi-level hierarchy
I include the second file in the first one
menu file :
Code:
<div id="left_menu_1" style='position:absolute;top:345px;left:210px;display:none;'>
   <table width="200"  cellspacing='0' cellpadding='0' border='0'>
      <tr>
         <td width='100%' align='left'>
            <a href='http://www.milonic.com/' id='milonicLink' style='display: none'>DHTML JavaScript Menu Courtesy of Milonic.com</a>
            <script type='text/javascript'>
            fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
            _menuCloseDelay=500;
            _menuOpenDelay=150;
            _subOffsetTop=0;
            _subOffsetLeft=0;
            with(menu_left=new mm_style()){
               //css
            }
            
            with(menu_1_left=new mm_style()){            
               //css
            }
               with(milonic=new menuname('Left Menu')){
                  alwaysvisible=1;
                  position='absolute';
                  orientation='vertical';
                  style=menu_left;
                  
         <?
         // query and echo aI strings
         ?>
                     
               }
         <?
         //call recursive function to make multi-level
         
         ?>
            drawMenus();
         </script>
      </td>   
   </tr>
</table>
</div>



when I open the page that requires this menu I make it visible
I tried to toggle the position attribute in milonic between relative and absolute but nothing happen except the sub menu open in another place..

Re: Problem with absolute positioning


Poster: Ruth
Dated: Wednesday March 19 2008 - 15:42:52 GMT

Hi,

Yes, it's not the menu file that has the problem, it is having the menu in the div which means it has to be relative, and having the div set to position absolute. Is there any way you can just position the menu absolutely? I'm going to have to suggest you contact Milonic directly about this. I don't do any php. I am assuming you have a professional or above license. If that is the case, you can use the beta support system

http://www.milonic.com/support/

Ruth