Creating and installing new menus

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: creating and installing new menus

Post by Ruth »

Hi,

Sorry this is going to be a pretty long explanation.

You can do the size thing a couple of ways. I'll put them both here and you can play with them and decide what you want.

1. Make your main menu coding like this:

Code: Select all

with(milonic=new menuname("Main Menu")){
alwaysvisible=1;
orientation="horizontal";
style=style1;
top=116;
screenposition="center";
menuwidth=900;
menualign="center";
Screenposition="center" is where the whole complete menu with the border goes, centered in the page. But, menualign="center"; is what aligns all the items in the center of the menu itself, so that everything looks the same on right and left side of the menu. Now when you put in Golf Stuff, if you do, then the items will spread out instead of putting all the spacing after the last item.

Now, you can also set it up without the menualign="center"; by putting in itemwidth="100%"; in place of that. This spreads the items out across the whole menu, also. Then in each item place a non-breaking line space code between the words. That's the & n b s p; with no spaces between the symbols and letters, like this:

Code: Select all

[b]Fun Stuff[/b]
What you see in the menu is only Fun Stuff, but that non-breaking line space will keep the words from wrapping. If you don't use them and the menu gets to be longer than the 900, the words will wrap to keep it at 900. With the non breaking line space coding, the menu will elongate. However, it will elongate at the right side, and if someone has a really large font set for their personal use, then the browser will get a bottom scroll bar and the menu will go beyond your table set up.

Personally, I would use the first one, and I wouldn't worry about wrapping because if a person has the font size very large it is for a reason, and there probably won't be that many who have that need so for most the menu will be just fine at 900, and will not have wrapping. Also, you could use the first one and also add itemwidth="100%"; so you'd have the menualign and the itemwidth.

There is a tool that I put together with the help of someone who did the js coding since I know nothing about that. I'm going to give you the link though you may not have time to play around with the tool. However, just at the bottom of the first page are some screenshots so you can see what is happening with margins and padding when used in the menu. Also, at the top are some screenshots and explanations of the various areas of the menu_data.js file so it may give you a less lost feeling as you develop things :)

http://support.milonic.com/beginners/me ... /index.htm

Just post back if you need anything more.

Ruth
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: creating and installing new menus

Post by thewolfe »

Thanks for the last post. I'm going to try to get all my pages changes to the new menu and get everything in order before a start on a new project.

Ck out http://www.dougsstuff.com/contributors.htm
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: creating and installing new menus

Post by Ruth »

:D Wow, thank you! That is so nice, it is really appreciated.

Just post back if you need more help. We need to start a new topic on the next post though since we have moved way beyond FrontPage errors :lol:
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: creating and installing new menus

Post by thewolfe »

Hi Ruth,

I have a menu question that I thought would be easier to show you so here it is. http://screencast.com/t/csBDFZXqN

Blessings,

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

Re: creating and installing new menus

Post by Ruth »

Hi Doug,

That's because the page for all of those underconstruction areas is the same: under_construction.htm. Since the page is the same the page highlighting will highlight every area that has that page. The only way to fix that is to actually turn off the pagebgcolor and pagecolor, or to set those particular items with the same off/on bgcolor and off/on color as in the main menu. This way you will have pagebgcolor and pagecolor in every item but the underconstruction ones. For example in the forum menu

Code: Select all

with(milonic=new menuname("forums")){
style=style3;
aI("text=Under construction;pagebgcolor=#0066cc;pagecolor=#FFFFFF;url=under_construction.htm;");
aI("text=Under construction;pagebgcolor=#0066cc;pagecolor=#FFFFFF;url=under_construction.htm;");
aI("text=Under construction;pagebgcolor=#0066cc;pagecolor=#FFFFFF;url=under_construction.htm;");
}
If you did this for every item that had underconstruction.htm as the url, then there would be no page coloring for that page, but all other items in the menu that had any other page would have page coloring. Hope that made sense.

Ruth

ps: I split this topic off from the FrontPage one.
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: Creating and installing new menus

Post by thewolfe »

Thanks Ruth. I'll either take those items of my menu for now or or make construction.htm, 1,2,3,4,5
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Creating and installing new menus

Post by Ruth »

You're welcome. And, I forgot you do have the option of renaming the pages, duh.

Ruth
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: Creating and installing new menus

Post by thewolfe »

What's your take. if you have one, on opening up a new browser page in the browser or just switching in the original page.

And if I want to open up a new browser page I just add target=_blank as in the following. url=dougs_tips_and_tricks.htm;target=_blank;");
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Creating and installing new menus

Post by Ruth »

Hi,

Well, I use new browser windows when I'm providing a link that goes to another site . If it's on my site, I just make sure that the menu is on all my pages and let it open in the same browser window. And, yes, target=_blank; is correct. You could also use target=_new; The distinction is that target=_blank will open a new window every time, that is if the person doesn't close one window, the next _blank will open a different one, while _new will open any new pages coded with target=_new; in that same window if it has not been closed.

Ruth
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: Creating and installing new menus

Post by thewolfe »

Hi Ruth

I'll keep it As I have it now. Inside on my site and a new browser on other sites.

Thanks & blessings,

Doug
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: Creating and installing new menus

Post by thewolfe »

Hi Ruth,

This one is probably too easy but my brain is cooked.

I have a hyperlink to Screencast.com on my main page. It's the ("Dougtorials") link about half way down. I'd like to open it in a new window. And since it's not in my "menu_array" I'm stuck.

Right now it's

Code: Select all

http://www.screencast.com/users/thewolfe
This is off the menu discussion but.....
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Re: Creating and installing new menus

Post by Ruth »

Hi,

Not a problem about off topic. It would work just like in the menu. So,

Code: Select all

<a href="http://websites.milonic.com/screencast.com/users/thewolfe" target="_blank">
				whatever goes here, text or image </a>
But just a note: next menu question, we need to start a new topic. That's so anyone who is searching for an answer to a particular menu question can find it.

Ruth
User avatar
thewolfe
Super Advanced
Super Advanced
Posts: 87
Joined: Thu May 20, 2004 10:44 pm

Re: Creating and installing new menus

Post by thewolfe »

Thanks Ruth and will do on the new topic.
Post Reply