Can I justifty the menu?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
thehenryfam
Beginner
Beginner
Posts: 7
Joined: Thu Apr 21, 2005 5:58 pm

Can I justifty the menu?

Post by thehenryfam »

Hello, I am implementing the most basic variation of the DHTML Menu v5 on a site. For placement on the page I have the main menu inside a table cell. I have the menuwidth set to a specific size (750px) to line up underneath the rest of the header. What I would like to do is evenly space the menu items inside the 750px block (sort of justify them I guess you could say). Because right now there is a much larger amount of space to the right of the last menu item than anywhere else on the menu. I just want to spread them out.

Is this possible? Or should I just use padding to get the effect manually?

By the way, I love this menu system.

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

Post by John »

I don't believe there's a justify command for the menu. I also don't think it's something you really want to do, especially given your, "...much larger amount of space to the right..." statement. Suggestion would be to remove the fixed width and let the menu find its own width, or possibly take some of the longer menu items to two lines.

A URL would be more helpful.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I second that url need.

You could also try menuwidth="100%"; instead of the 760px and see if that fills the full space. But you should test that in different browsers to see if they all render the same using that.

Ruth
thehenryfam
Beginner
Beginner
Posts: 7
Joined: Thu Apr 21, 2005 5:58 pm

Post by thehenryfam »

Thanks, John and Ruth, for the responses.

When I remove the hard-coded width altogether, the menu bar doesn't fill the space, which is ugly.

I was able to change the width to 100% without any problem and it gives the same effect as hard coding it.

One odd thing I noticed is that in IE the menu seems centered and all other browsers it favors the left side.

Here is the URL if you want to take a look:
http://www.billriceranch.org/newsite/index.php

It's no big deal. It seems to work all right as is. Being the eternal perfectionist, I just thought it would be nice to have equal spacing between the menu items.

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

Post by John »

How 'bout this, Scott?

Now that you put a URL up there we can better understand what you were talking about... :)
John
thehenryfam
Beginner
Beginner
Posts: 7
Joined: Thu Apr 21, 2005 5:58 pm

Post by thehenryfam »

Interesting. I like that. Is that just from the addition of the screenposition parameter? I hadn't played with that one. I'll test it in different browsers and see.

Thanks for the help, John.

Scott
thehenryfam
Beginner
Beginner
Posts: 7
Joined: Thu Apr 21, 2005 5:58 pm

Post by thehenryfam »

Ok, I tested it in a variety of browsers on both PC and Mac and it seems to work fine.

Also, as a side benefit, thanks to you I was able to fix another problem I had posted about today, namely the fact that the menu bar was not filling the width of the table cell in Mac IE v5. Well, I saw you had menuwidth=750 where I had menuwidth="750px". So I tried your way and it fixed the Mac IE problem. Go figure!

Again, thanks for all your help.

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

Post by John »

It's partially the screenposition, but to get that to actually center I had to change the 100% to 750 to match the picture above. Also added a missing drawMenus(); at the end of your data file.

Go figure IE :?: I don't think anybody here, or you, would waste the time :!: :D
John
User avatar
fredlongworthhighschool
Mega Advanced
Mega Advanced
Posts: 362
Joined: Fri Jun 27, 2003 11:34 am
Location: Manchester, England.
Contact:

Post by fredlongworthhighschool »

Slightly off topic, but I really liked the effects you have on the thumbnails you have on your main page Scott, how did you create them?

EDIT: Not to worry, I figured it out using Fireworks and Alien filters!
Andy Davis
Web Designer & Smartboard Manager

Fred Longworth High School, Manchester, England.
Post Reply