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

offset Centering problem, link inside to example


Poster: invokebane
Dated: Tuesday December 30 2003 - 3:31:22 GMT

I am having a problem getting the menu to stay where i want it to. Basicly i have a web layout, and it is one o fthem 800pixel layouts that are centered to the screen. Also where i want the menu is just offset from center, its more towards the left. Which is problem #1.


Problem #2 is that when you shrink the browser smaller then the layout, the layout stays like its suppose to, but the menu keeps centering....


I guess i'd like to put the menu in a table, that can be ontop of stuff like it is now, in a layout like thing. So i can position it how i want.

EXAMPLE:
http://unix-web.triton.net/~tkruger/index.php


Poster: mjjackso
Dated: Tuesday December 30 2003 - 21:05:19 GMT

This problem can be solved by placing the menu within a table cell.

The following code should work:
Code:
<td>
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td>
<script>PlaceMenu("mainmenu")</script>
&nbsp;
</td></tr></table>
</td>

Matt


Poster: kevin3442
Dated: Wednesday December 31 2003 - 9:21:41 GMT

(1) Set the menu array's Screen Position element (6th element) to "center" the way I assume you are now.

(2) Set the menu array's Menu Top element (2nd element) to the number of pixels you want the menu to be from the top, again the way you probably already do it.

(3) Offset the menu to the left by setting the menu array's Menu Left element (3rd element) to:
Code:
"offset=-100",  // Menu Left

The numeric value is the number of pixels to offset by. Negative values offset the menu to the left; positive values to the right.

You might want to consider upgrading to Version 5 before you get too far along into the site design. Version 3 is no longer officially supported and this part of the forum seems to get less and less attention.

Hope that helps,

Kevin


Poster: Ruth
Dated: Wednesday December 31 2003 - 9:51:14 GMT

And Version 5 is fantastic. Does so many more things than 3

ok


Poster: invokebane
Dated: Monday January 12 2004 - 15:09:38 GMT

First off i tried the offset and nothing happens... second, i wrote a php backend for version 3, and really would suck to move to 5.


Poster: Ruth
Dated: Monday January 12 2004 - 17:39:36 GMT

Quote:
that when you shrink the browser smaller then the layout, the layout stays like its suppose to, but the menu keeps centering....
What exactly does that mean? The layout never changes size? if so, then just set the top and left position and the menu should never move from what you specify. i.e. top=5 and left=150 would put the menu at that position no matter what size the window. As to the backend php, I have no idea what that is :lol: so I don't know how difficult it is to upgrade, though I believe that this site is php and uses version5, of course. :)

Ruth

uh


Poster: invokebane
Dated: Tuesday January 13 2004 - 19:26:09 GMT

innkeeper9 wrote:
Quote:
that when you shrink the browser smaller then the layout, the layout stays like its suppose to, but the menu keeps centering....
What exactly does that mean? The layout never changes size? if so, then just set the top and left position and the menu should never move from what you specify. i.e. top=5 and left=150 would put the menu at that position no matter what size the window. As to the backend php, I have no idea what that is :lol: so I don't know how difficult it is to upgrade, though I believe that this site is php and uses version5, of course. :)

Ruth



you didnt visit my example page eh? , the layout CENTERS itself with the browser, and i need the menu to stay with it, but not completely center, since the menu needs to be left like 100 pixels, but then when the browser shrinks below layout side, the menu contines to center, making it look crappy

Anyhow, i have the last version 3, and the OFFSET does not work for me.

I guess i will keep my website non center/static until i upgrade to 5


Poster: Ruth
Dated: Tuesday January 13 2004 - 22:58:43 GMT

Yes, I did, but i didn't think to resize it... :oops:

Ruth

hmm bad page


Poster: invokebane
Dated: Monday January 19 2004 - 20:28:32 GMT

innkeeper9 wrote:
Yes, I did, but i didn't think to resize it... :oops: Ok, try this. It seems to work, it's just your page with the placemenu and some non breaking line spaces and another two columns in the table...it uses the testlogo.jpg as the background of the center td rather than an inserted image within the td. Check the code, you'll see what I did. Not sure if that's what you want or need, or if you can even use it since it sizes that td cell at 700 and the outside ones at 40 each. It seems to work, I tried 640x480, 800x600, 1028x768, but I only resized the window I did not change resolution. If nothing else it may give you some ideas, even if it's not the most elegant solution.

http://www.poems2u.com/1/a/test.htm

Ruth



UH OH!!!!
Sorry for the goof!!
The page you requested seems to be unavailable
or I messed up the URL in the link.


???

hey


Poster: invokebane
Dated: Monday January 19 2004 - 20:29:29 GMT

I am going to upgrade to 5 soon, basicly i found a HUGE error in menu 3


i hope it is fixed in 5. If you have ALOT of DATA on your page, html.. like 500k worth, the menu hovers etc, RUNS REALLY SLOW!


is this fixed in v5?


Poster: Ruth
Dated: Tuesday January 20 2004 - 0:02:06 GMT

As far as I know from all the comments, it's a much faster menu. It's also much more versatile..you can do so much with it. I"m sorry about the link. :oops:

LINK: Removed

hmm


Poster: invokebane
Dated: Tuesday January 20 2004 - 20:42:03 GMT

[quote="innkeeper9"]As far as I know from all the comments, it's a much faster menu. It's also much more versatile..you can do so much with it. LINKS REMOVED: 12/30/08


javascript error, no menu appearing on your link :)

btw, thanks for anwseing my questions quick!


Poster: Ruth
Dated: Wednesday January 21 2004 - 0:56:27 GMT

Well, I have no idea why you are getting that. I've gone to that link in NS4.79, 6.1, 7.0, Opera 6, 7 and IE 5 and I get the page each time with the menu and the background. Here are the files, I put them in a zip. If you can't get that I have no idea what to tell you. LINKS REMOVED: 12.30/08
There are two images there, that's how I did it finally so that it would center in all the browsers I tested, because netscape and ie read the tables differently. If you want to try doing it yourself, here's the code I used.
Code:
<SCRIPT language=JavaScript src="menuArray.htm"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript src="menuScript.htm"
type=text/javascript></SCRIPT>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" width="800">
  <TR>
    <TD></TD>
    <TD bgcolor="#000000"><IMG WIDTH="170" HEIGHT="100" SRC="logoleft.jpg"></TD>
    <TD bgcolor="#000000"><img src="clear.gif" width="320" height="1" border="0"><BR><script language=JavaScript>PlaceMenu("Main_Menu") </script></TD>
    <TD bgcolor="#000000"><IMG WIDTH="170" HEIGHT="100" SRC="logoright.jpg"></TD>
    <TD></TD>
  </TR>
</TABLE>
to get the effect I took your logo and made it two, logoleft is the first 170 pixels and logoright is the last 170pixels of your original image. The images are in that zip file. Good Luck. [Just for your info, I'm don't know why the menu files are htm documents, but that's how they download so that's how I put them up.]

Ruth

hey


Poster: invokebane
Dated: Wednesday January 21 2004 - 13:47:42 GMT

innkeeper9 wrote:
Well, I have no idea why you are getting that. I've gone to that link in NS4.79, 6.1, 7.0, Opera 6, 7 and IE 5 and I get the page each time with the menu and the background. Here are the files, I put them in a zip. If you can't get that I have no idea what to tell you. LINKS REMOVED: 12/30/08
There are two images there, that's how I did it finally so that it would center in all the browsers I tested, because netscape and ie read the tables differently. If you want to try doing it yourself, here's the code I used.
Code:
<SCRIPT language=JavaScript src="menuArray.htm"
type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript src="menuScript.htm"
type=text/javascript></SCRIPT>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" align="center" width="800">
  <TR>
    <TD></TD>
    <TD bgcolor="#000000"><IMG WIDTH="170" HEIGHT="100" SRC="logoleft.jpg"></TD>
    <TD bgcolor="#000000"><img src="clear.gif" width="320" height="1" border="0"><BR><script language=JavaScript>PlaceMenu("Main_Menu") </script></TD>
    <TD bgcolor="#000000"><IMG WIDTH="170" HEIGHT="100" SRC="logoright.jpg"></TD>
    <TD></TD>
  </TR>
</TABLE>
to get the effect I took your logo and made it two, logoleft is the first 170 pixels and logoright is the last 170pixels of your original image. The images are in that zip file. Good Luck. [Just for your info, I'm don't know why the menu files are htm documents, but that's how they download so that's how I put them up.]

Ruth



Ok, i tried the link again still javascrtip error, but i did download the zip and it works flawless. thanks alot.

But there is some issues, basicly i can't break up images like that.

Let me show you my website, and maybe you can tell me a idea.

Basicly here is how i have it right now.
http://www.bulkorderdeeds.com/

Notice, the website is left aligned. I want to have it center align. And put the menu in the center of the claws. The claws are offset to the left some.

I tried putting your code in here, using the members menu.
http://www.bulkorderdeeds.com/test.php

It follows the website now on center, but isn't in the right location.

-Todd
PS. i will be buying version 5, as soon as i can figure this out, i just want to make sure this works. I am very impressed with the menu and people.


Poster: Ruth
Dated: Thursday January 22 2004 - 1:24:48 GMT

Version 5 is MUCH better, it's more advanced, uses more of the up to date things you cannot do with version3.

Ruth

hey


Poster: invokebane
Dated: Sunday February 1 2004 - 22:27:30 GMT

LINK REMOVED: 12/30/08


HI, i took a break and when i visited this board, your link is bad, can you repost it for me plz


Poster: Ruth
Dated: Monday February 2 2004 - 6:07:13 GMT

Naw, it's still there, the operator :roll: was bad, lol. I put the wrong url up. So, it's LINK REMOVED: 12/30/08 Sorry....I'm glad I hadn't got around to clearing out my site yet. ::whew::
I'd make one suggestion besides what I wrote in the read me file. Because you like to use curves which I also like, keep it left aligned, just design it so that the far right if they have their browser set for more than 800x600 blends in even if there's nothing there but the design...maybe some black/silver swirly thing or something :lol:
Ruth

ah


Poster: invokebane
Dated: Tuesday February 10 2004 - 17:59:40 GMT

innkeeper9 wrote:
Naw, it's still there, the operator :roll: was bad, lol. I put the wrong url up. So, it's LINK REMOVED: Sorry....I'm glad I hadn't got around to clearing out my site yet. ::whew::
I'd make one suggestion besides what I wrote in the read me file. Because you like to use curves which I also like, keep it left aligned, just design it so that the far right if they have their browser set for more than 800x600 blends in even if there's nothing there but the design...maybe some black/silver swirly thing or something :lol:
Ruth



Ok it works great, but i want to upgrade to version 5 now LOL.. and it was not as easy as it would seem. I replaced the files, but now it breaks my tables up instead of hovering over the images....


Yeah this line here seems invalid with version 5:
<SCRIPT language=JavaScript>PlaceMenu("Main_Menu") </SCRIPT>


I tried using the example on this page, but it just breaks apart my images because it acts like a solid object and not a layer like normal...
http://www.milonic.com/menusample9.php


Poster: John
Dated: Tuesday February 10 2004 - 20:05:30 GMT

v5 is completely different. You MUST read the included docs.


Poster: Ruth
Dated: Wednesday February 11 2004 - 3:23:34 GMT

Yes, it's different, but oh so much better, so many more options. But, it will still do what you want you just need to experiment some. 1st, you will need to place the background image of the table cell in which you put the menu as a style and not insert the image actually in the table.

it works in netscape6, 7, opera, firebird and ie5. It would work more or less in netscape4.79 if you used .js files instead of .htm files for the milonic_src and the menu_data, but for some reason when those are .htm files netscape ignores them.

Drop an OK or I got it here so I knew when to take it down. And you need to post ? about 5 in the other forum now.
Ruth

Ruth you rock!


Poster: invokebane
Dated: Wednesday February 11 2004 - 14:33:17 GMT

Hey thanks alot Ruth, I dropped in your code and it worked flawless like usaul. You really know your coding :)

Feel free to remove your examples, i have got them.

thanks again

-Todd
Web Programmer
Triton.net


Poster: Ruth
Dated: Wednesday February 11 2004 - 15:26:31 GMT

It's not coding...boy I wish I knew coding...It's really the result of NOT knowing how to get images in a certain place and so at the beginning relying on using tables, nested tables and clear.gif to move them where I want them. :lol: Took me months to finally figure how to get my site so it would change the menu to match each page!

Ruth