Menu no longer centered when I change resolutions

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Menu no longer centered when I change resolutions

Post by rudy »

When I'm set at 800x640 the menu is center on the page correctly but if I change to a higher resolution the menu is no longer centered.

I know some on this forum posted a table script that would solve this, but I have searched the postings and can't seem to find it.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

A link for the page would be helpful to let people see the coding. As for putting it in a table http://milonic.com/menusample.php?sampleid=9 this is for putting the menu in a table. You might try doing a forum search on tables and see if there's any more info.

Ruth
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 Rudy,

If all you want to do is center your menu, you don't need to put it in a table (I would recommend that you not embed it in a table unless absolutely necessary). To center the menu, set the menu's top property to the top position you want, remove the left property altogether, and set screenposition="center"; like so:

Code: Select all

with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=10;
screenposition="center";
alwaysvisible=1;
orientation="horizontal";
aI("text=Home;url=http://milonic.com/;status=Back To Home Page;");
.
.
.
}
Hope that helps,

Kevin
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Thanks Kevin

Post by rudy »

Thanks alot Kevin

Using the "screenposition="center"; did the trick. Now no matter what screen resolution a visitors monitor is set at my menu will always be centered on the page.

Tried to do this putting it in a table, but that didn't work.


Thanks again :D
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Rudy, you've got some pretty basic questions posted all over the place, which is fine - we're here to help. However, most of what you have asked can be found by doing some reading. See http://milonic.com/forum/viewtopic.php?t=2981.
John
Post Reply