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

horizontal center


Poster: Silverion
Dated: Monday December 15 2003 - 23:15:35 GMT

I tried the general help i got in my last post, but it didnt help

can someone give me the exact thing I need to do in order to center position my menu, but to have the top alignment absolute?

my code from menu_data.js is the following:

Quote:
...
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=45;
left=325;
alwaysvisible=1;
orientation="horizontal";
position="absolute";
...
[/quote]


Poster: kevin3442
Dated: Monday December 15 2003 - 23:34:19 GMT

Try:
Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=45;
screenposition="center";
alwaysvisible=1;
orientation="horizontal";
...item definitions...
}

Note the removal of the left and position properties, and the addition of the screenposition property.

Hope that helps,

Kevin

makes more problems


Poster: Silverion
Dated: Monday December 15 2003 - 23:57:22 GMT

when I do that, it causes it to be centered, but everytime the browser is resized, the height of the actual menu itself grows. help!

example: http://digital.dyns.net

edit: I also need a left offset from center to put it in the right place


Poster: kevin3442
Dated: Tuesday December 16 2003 - 0:31:35 GMT

Hi,

I think the root of the problem is that you're using RC7. There have been a few improvements since 7. The current release is RC30; you can get it here (note that you must log in before you can download). Once you unzip the download file, upload milonic_src.js, mmenudom.js, and mmenuns4.js to your web server, replacing the older version of these three files with the new ones you downloaded.

I tried your code with RC30, and it works without growing the menu. Since the scriptpath variable was removed from the menu source code, you'll have to edit your html file a little. Replace the following:
Code:
<script language="JavaScript" src="milonic_src.js" type="text/javascript"></script>
<script language="JavaScript" src="menu_data.js" type="text/javascript"></script>

with this:
Code:
<SCRIPT language=JavaScript src="milonic_src.js" type=text/javascript></SCRIPT>
<script   language=JavaScript>
if(ns4)_d.write("<scr"+"ipt language=JavaScript src=mmenuns4.js><\/scr"+"ipt>");
  else _d.write("<scr"+"ipt language=JavaScript src=mmenudom.js><\/scr"+"ipt>");
</script>
<SCRIPT language=JavaScript src="menu_data.js" type=text/javascript></SCRIPT>

You might also want to read the .txt files that come with the download.

Hope that helps,

Kevin


Poster: Silverion
Dated: Tuesday December 16 2003 - 0:39:20 GMT

now I just need to remove the 'milonic menu' thing and also to add a center offset...can you help?


Poster: kevin3442
Dated: Tuesday December 16 2003 - 1:20:01 GMT

Yep... I can help!

As for removing the "Milonic Menu" thing, the only way to do that is to license the software. You can obtain a free license if you are a non-profit organization or if it's a personal website (there is, however, a small admin. fee to cover Milonic's costs to verify that it is indeed a non-profit site.) You can check out various links in the forum or on the site for more info. Here are some places to start:

http://www.milonic.com/nplicense.php

http://www.milonic.com/forum/viewtopic.php?t=2760

http://www.milonic.com/licfaq.php

http://www.milonic.com/ (scroll down the page to "The Free Downloads are Back")

As for a center offset... what is it you'd like to do... offset in which direction and by how much? Heading home now, so probably see you tomorrow.

Cheers,

Kevin


Poster: Silverion
Dated: Tuesday December 16 2003 - 1:52:41 GMT

probably an offset to the right, the end of the menu has to come before the tilt in the red line on the graphic


Poster: kevin3442
Dated: Tuesday December 16 2003 - 16:34:18 GMT

Ahh yes... I see. That'll look nice. You'll have to put the the left property back in the menu definition, then use it to offset to the right. Like so:
Code:
left="offset=104";

The value (e.g., 104 above) is in pixels. A positive value offsets to the right; negative to the left.

Hope that helps,

Kevin


Poster: Silverion
Dated: Tuesday December 16 2003 - 21:30:58 GMT

thanks for your help kevin!


Poster: kevin3442
Dated: Tuesday December 16 2003 - 22:42:08 GMT

You're welcome.