Problem with absolute positioning

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
the_last_tamurai
Beginner
Beginner
Posts: 2
Joined: Tue Mar 18, 2008 9:40 am

Problem with absolute positioning

Post by the_last_tamurai »

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: Select all

<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.???!!!!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Problem with absolute positioning

Post by Ruth »

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
the_last_tamurai
Beginner
Beginner
Posts: 2
Joined: Tue Mar 18, 2008 9:40 am

Re: Problem with absolute positioning

Post by the_last_tamurai »

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: Select all

<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://websites.milonic.com/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..
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Problem with absolute positioning

Post by Ruth »

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://milonic.com/support/

Ruth
Post Reply