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: Archived Topics for the old Version 3.0 JavaScript Menu
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:32

menu height


Poster: indianlore
Dated: Friday April 25 2003 - 13:44:04 BST

Hi there,

Is there any way to tweak the menu height?

Thanks in advance


Poster: kevin3442
Dated: Saturday April 26 2003 - 7:34:44 BST

You've come across something elusive! There is no built-in way to set menu height. It appears to be determined from the menu's font. The best workaround I've found involves the ol' tried-and-true one-pixel, transparent gif trick.

First, make a one-pixel, transparent .gif. You will insert that gif image on both sides of the Description Text in each menu item definition. Set the height attribute of each <img> tag to specify the height that you want. When the menu renders, it'll adjust its height to accomodate the transparent gifs. But it doesn't end there. If you just use the gifs, then your menu will be taller, but the menu text will appear along the bottom (not a problem if you like that appearance). So, to adjust the vertical positioning of the text, you'll surrount the menu text with an <a> tag, then apply a style to move the text. So, each menu item would be defined something like this:
Code:
,"<img src=1px.gif border=0 height=25><a style='vertical-align:50%;'>Home</a><img src=1px.gif border=0 height=25>","theurl.htm",,,1

In the above example, the transparent gif file is called 1px.gif, and the height is set to 25px.

Looks cumbersome... I suppose because it is! But it worked for me. Again, I've found that it will only work if you put the transparent gif on both sides of the menu item's description text.

Hope that helps,

Kevin