Position of the menu not working...

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
Bâshrat the Sneaky
Beginner
Beginner
Posts: 2
Joined: Sat Jul 31, 2004 9:05 pm
Location: Belgium
Contact:

Position of the menu not working...

Post by Bâshrat the Sneaky »

Hi!

I've fully configured my menu, (not yet the content of it), but I can't get it centered :'(

You can find the test page here: http://www.btsunattended.net/tutorials/19.htm

This is my menu_data.js:

Code: Select all

_menuCloseDelay=500           // The time delay for menus to remain visible on mouse out
_menuOpenDelay=150            // The time delay before menus open on mouse over
_subOffsetTop=2        		  // Sub menu top offset
_subOffsetLeft=-10            // Sub menu left offset
_scrollAmount=3               // Only needed for Netscape 4.x
_scrollDelay=20               // Only needed for Netcsape 4.x
_followSpeed=5
_followRate=50


with(menuStyle=new mm_style()){
onbgcolor="#7AA2F1";
oncolor="#FFFFFF";
offbgcolor="#EDF1F8";
offcolor="#515151";
bordercolor="#C4C4C4";
borderstyle="solid";
borderwidth=1;
separatorcolor="#C4C4C4";
separatorsize="1";
separatoralign="center";
separatorwidth="66%";
padding=5;
fontsize="100%";
fontstyle="normal";
fontfamily="Verdana, Helvetica, sans-serif";
subimage="/tutorials/menu/arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.0);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
onborder="1px solid #316AC5";
screenposition="center";
}
Note that the menu is NOT in a table!
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Post by rudy »

Try placing the javascript code right after the <body> tag or in the <head> portion of your opening page as indicated in the "install.txt" file, as shown below:

3. Inform your web pages that you want the menu to appear when they are loaded.
To do this, you need to add the following JavaScript tags to your HTML page:

<script type="text/javascript" src="milonic_src.js"></script>
<script type="text/javascript">
<!--
if(ns4)_d.write("<script language=JavaScript src=mmenuns4.js><\/script>");
else _d.write("<script language=JavaScript src=mmenudom.js><\/script>");
-->
</script>
<script type="text/javascript" src="menu_data.js"></script>

The position of the above is not particularly important, but it's advisable to
place these tags just after the <BODY> tag or in the <HEAD> of your document.
This help minimize the risk of a conflict with other objects. The order in which
the tags appear IS important, and must be as shown above.
Rudy
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi Bâshrat the Sneaky,

You have screenposition="center"; in your menuStyle definition, but screenposition is a menu property, not a style property. That line should go in the menu definition. E.g.,

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
alwaysvisible=1;
orientation="horizontal";
screenposition="center";
aI(...
}
Hope that helps,

Kevin
Bâshrat the Sneaky
Beginner
Beginner
Posts: 2
Joined: Sat Jul 31, 2004 9:05 pm
Location: Belgium
Contact:

Post by Bâshrat the Sneaky »

kevin3442 wrote:Hi Bâshrat the Sneaky,

You have screenposition="center"; in your menuStyle definition, but screenposition is a menu property, not a style property. That line should go in the menu definition. E.g.,

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
alwaysvisible=1;
orientation="horizontal";
screenposition="center";
aI(...
}
Hope that helps,

Kevin
I'm afraid I forgot to say thanks :oops: :oops: :cry:

THANKS!

And a happy 2005! :!: ;)
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Bâshrat the Sneaky wrote:I'm afraid I forgot to say thanks :oops: :oops: :cry:

THANKS!

And a happy 2005! :!: ;)
You're welcome.

Happy 2005 to you too.

Kevin


P.S. to rudy... Thanks also to you, rudy, for jumping in with some answers. You should do it more often!
Post Reply