This sample demonstrates how to put the menu inside a table cell. The key
property change for this sample is the position property for the menu that you want
inserting into the table. The embedded menu needs to have a position of
relative, this is achieved by the following command position="relative";
All other menus MUST use a default position of
"absolute" otherwise the browser will fix the position of the submenus relative to
other page content. This will
affect the appearance of your page and also your sub menus will not be able to move
around the browser window.
Note that this feature is still a work in progress and issues with tables
embedded within tables are still evident, we are working on this though.
If you
are experiencing problems with relative menu positioning however, try and embed
only the menu you want to be included within the table cell. Embedding whole
menus is possible but can cause unpredictable results in complex table
structures. The following will
describe how this can be acheived.<html>
<head>
<SCRIPT language=JavaScript src="/milonic_src.js" type=text/javascript></SCRIPT>
<SCRIPT language=JavaScript src="/menu_data.js" type=text/javascript></SCRIPT>
</head>
<body>
<table>
<td>
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
alwaysvisible=1;
orientation="horizontal";
position="relative";
aI("text=Home;url=http://www.milonic.com/;status=Back To Home Page;");
aI("text=Menu Samples;showmenu=Samples;");
aI("text=Milonic;showmenu=Milonic;");
aI("text=Partners;showmenu=Partners;");
aI("text=Links;showmenu=Links;");
aI("text=My Milonic;showmenu=My Milonic;");
}
drawMenus();
</script>
</td>
</table>
</body>
From the code above, you will see that the sub menus are included in the <head>
of the document. As these menus are "absolutely positioned" they are
independent of all other HTML objects. The only menu that is dependant on the
flow of the HTML is "Main Menu" and this has been included separately inside the
cell of a table.
|