I'm a newbie to this menu and are currently starting to evaluate this menu for use in a CMS application.
QUESTION 1:
I want the menu to use the width of the table cell, but not to go outside the table borders.
I would like to be able to tell menu/menuitems to use 100% of the table cell width, and not specify it in pixels (since that is specified in the stylesheet for the table).
How do I make this work crossbrowser?
The sample code at end of post are not accurate (may be my fault though), neither in FF nor in IE7, not tested any other browsers though....
In my Firefox 2.0.0.3 the right side of the menu go above the 1px border of the table cell.
In IE7 it looks like the menu is within the borders, but somehow the right border of the table cell does not show. Top and bottom border of table cell continues some 4 to 5 pixels to the right of the right side of the menu, but the right border of the table cell are not visible....
QUESTION 2:
For most of my vertical menus I want it to be placed within a table cell which will have a fixed width.
I would like the menu not to be wider than the fixed width of the table cell, no matter what the content of the menuitems would be.
So let say a site admin enters Homeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
for the item text and the table cell was set to 150 px wide then the text that does not fit within the boundaries of the table should not be visible.
Is that possible to accomplish?
If so it would be nice to se an example on how to make it work.
Anyway.... have looked around on your site and looked at the examples which looks really nice. Like the way the menu detect if there is no room for the submenu because of a narrow viewport and then decides to show the submenu on the oposite of the parent menu (awesome work)...
also like the way the menu handles the situation where there is not enough space to show all the menuitems of a submenu because of lack of space in the viewport... very intuitive (and a lot better than it was done in Deluxe-Menu... where it is scrolling... which may cause the visitor to belive there is no more options ... and therefore leaves the menu or page/site)...
Best regards
BELOW are code rel. to question 1:
Code: Select all
<table>
<tr>
<td style="border:1px solid red; width:150px">
<script>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
alwaysvisible=1;
orientation="vertical";
position="relative";
menuwidth="100%";
itemwidth="100%";
aI("text=Home;url=http://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>
</tr>
</table>