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

Yet another centering question


Poster: shacker
Dated: Saturday January 21 2006 - 0:48:19 GMT

Hi - I've read as many posts here as I could find on using the screenposition property, and it all seems very straightforward. Can't see that I'm doing anything wrong or unusual, but can't seem to get the menu to center (in any browser, Mac or Win).

The site design is table-free, so I can't hang the script inside a cell.

Code:
with(milonic=new menuname("Main Menu")){
style=menuStyle;
top=95;
left=150;
alwaysvisible=1;
orientation="horizontal";
screenposition="center";


The script is invoked from within HEAD. Everything basically works (but I'm still tuning/developing), but just can't seem to get centering to work.

Dev site is here:
http://dev.journalism.berkeley.edu/alumni/

Problem is unchanged when the "DHTML Menu by Milonic" link is added to page (and we're buying a licensed version anyway).

Thanks,
Scot


Poster: Ruth
Dated: Saturday January 21 2006 - 1:43:55 GMT

Hi,

You are using left=150; Get rid of that and the menu should center. If you are trying somehow to get it to be 150px more to the left than center, then what you want is left="offset=150"; that should make it center and then shift it 150 more toward the right.

Ruth


Poster: shacker
Dated: Saturday January 21 2006 - 2:37:58 GMT

Thanks very much Ruth. Ironically, I just (finally) figured that out on my own, came back to update this query, and you had already answered!

I had actually tried that earlier, but what threw me was that I was testing to by resizing from the browser corner, but was not releasing the mouse button after dragging. After release, the menu snaps to center. Duh!