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

Menu/Item height & Centralizing Main Menu Items.


Poster: multiplexed
Dated: Monday October 27 2003 - 18:17:40 GMT

How do I alter the height of the menu. I'm using the table cell compatible menu and when I insert the code into the proper cell it throws off the alignment of the page. I think the menu is just too tall and I can't resize the cell or that throws off the alignment as well.

Question 1 is how do shorten the main menu height. I've seen the menu quick reference but it doesn't tell you where to put the directive. I've tried putting itemheight=25 and menuheight=25 into both the main .html page and the menudata.js script but neither works. What's the default value?

Question 2 is the menu items are in the .html page. I know I can use SSI for central administration, but I'd rather put this stuff in a central javascript (unless SSI would reduce the weight of the page).

This is what I've copied and pasted into my main .html page in order to get this menu system to work. It'll probably wrap and is enclosed in a "<td>" tag.

Note that I only have a kindergarden level concept of .html and .js though I can configure directives if I know where and what to edit.


Code:
<SCRIPT language=JavaScript src="scripts/milonic_src.js" type=text/javascript></SCRIPT>   
<script language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=scripts/mmenuns4.js><\/scr"+"ipt>");      
else _d.write("<scr"+"ipt language=JavaScript src=scripts/mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="scripts/menu_data.js" type=text/javascript></SCRIPT>   
<script>
     with(milonic=new menuname("Main Menu")){
     style=menuStyle;
     top=155;
     left=200;
     alwaysvisible=1;
     orientation="horizontal";
     overfilter="";
     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>   


Poster: kevin3442
Dated: Tuesday October 28 2003 - 23:20:25 GMT

Hi,

Looks like this one got missed... easy to do when the boards are busy. Anyway, I'll take a stab at it.

Quote:
Question 1 is how do shorten the main menu height. I've seen the menu quick reference but it doesn't tell you where to put the directive. I've tried putting itemheight=25 and menuheight=25 into both the main .html page and the menudata.js script but neither works. What's the default value?

menuheight is not a supported property (hence, you don't see it mentioned in the quick reference pages), so that won't help you. Fortunately, if the menu is horizontal, as it seems you want yours to be, then the menu's height is essentially the same as each item's height. So, setting itemheight=25; should do the trick. You'll note in the docs that this is both a menu property (defined in the menu, outside of the aI() calls), as well as a menu item property (defined per item, in the aI() call). Functionally, however, they have the same effect in a horizontal menu. I.e., if you set one item of a horizontal menu to a specific height, then the rest of the items in the menu follow suit. So, you might as well just set it as a menu property (see code below). There is no default value, as far as I know. if not specified, the menu will size itself according to various entities, including fontsize, borders, padding, etc.

Quote:
...but I'd rather put this stuff in a central javascript (unless SSI would reduce the weight of the page).

Shouldn't be a problem. Many people have done so, even if they are embedding the menu in a table. If you search the forum for "table" then you will run across many threads discussing the use of the menus in tables. I have to say, however, that I've seen lots of instances where people feel they must use tables for placing the menu when that really makes things over complicated. Many of those instances could be handles just as well by using the menu's internal placement capabilities, which are quite flexible.

Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=155;
left=200;
alwaysvisible=1;
orientation="horizontal";
position="relative";
itemheight=25;
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;");
}


Hope that helps,

Kevin