aligning a main menu item right - {SOLVED}

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
brobesky
Beginner
Beginner
Posts: 2
Joined: Fri Aug 26, 2005 5:38 pm

aligning a main menu item right - {SOLVED}

Post by brobesky »

I have installed the current version of the Milonic style menu and everything, almost, is functioning like I want. However, I have one problem: i want the far right menu item aligned right.

For example:

Code: Select all

Menu 1  !  Menu 2 !  Menu 3                                     Menu 4


Using padding, I am almost able to accomplish this. Unfortunately, since padding seems to be absolute, Menu 4 does not move to the right, or left, when the browser screen is resized.

Is there any way to accomplish this?

Thanks,

Bob
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

You can try inserting a 'blank' item and set percentages for each item. For example, you have 4 items, let's say that a reasonable percentage for each is 15%, which would equal a '60% width' of the particular page area width. YOu could add a blank item which was 40% just before the last item and that would make the menu 100% with that new 4th item shifting your last item all the way over.

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
left=10;
orientation="horizontal";
style=menuStyle;
top=10;
aI("status=Back To Home Page;text=Home;url=http://milonic.com/;itemwidth=15%;");
aI("showmenu=Samples;text=Menu Samples;");itemwidth=15%;");
aI("showmenu=Milonic;text=Milonic;itemwidth=15%;");
aI("text= ;separatorsize=0;itemwidth=40%;headerbgcolor=THE OFFBGCOLOR LISTED FOR ALL THE ITEMS;type=header;");
aI("showmenu=MyMilonic;text=My Milonic;itemwidth=15%;");

}
I used a percantages equal to 100% but you could use pixels for the items if you want the menu a particular width. Also, I used headerbgcolor to make sure that item will always be the same color as the offbgcolor of the menu and type=header so that the mouse will not change when it moves over that area, and separatorsize=0; so that there would be no separator at the end of that blank item.

Ruth
brobesky
Beginner
Beginner
Posts: 2
Joined: Fri Aug 26, 2005 5:38 pm

Post by brobesky »

Thank you. That worked perfectly.

Bob
Post Reply