Width of vertical menu in table

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Width of vertical menu in table

Post by Arcady »

Hello. I testing out this menu script to see if it can be integrated into my site. I cannot figure out how to make the menu as wide as the table cell I am putting it in.

See example here: http://www.sg1archive.com/index2.shtml

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

Post by Ruth »

Took me forever to find it. You have to change this in the menu_data.js file

Code: Select all

overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color='#777777', Direction=135, Strength=5)";
to

Code: Select all

overfilter="Fade(duration=0.2);Alpha(opacity=90)";
That shadow is shifting the menu to make the shadow. Then on the page in the main menu put the following getting rid of top and left positions

Code: Select all

with(milonic=new menuname("Main Menu")){
          style=menuStyle;
          menuwidth="100%";
          alwaysvisible=1;
          position="relative";
Also, just for your info, if you make the table 120 width instead of 122 it will match the Navigation menu below, and in this menu, if you put in non-breaking lines spaces after the words like Home   you can shift the arrows over to the right side more. You'll need to experiment on how many for each item. Lastly, in the menu_data.js file, you should change the _subOffsetLeft=-10 a bit lower, like maybe -2 or -3. That -10 is putting the submenu 10 pixels into the main menu.

Really nice page. I like Stargate.

Ruth
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

I tried what you said, but I still cannot get it to work. It is only as wide as the text, and that is useless to me. What am I missing?

Also, it doesn't even appear at all in Internet Explorer on the Mac. I need this to work in all browsers. I'm thinking of dropping the idea for javascript menus altogether at this point. It's too much work for something that should be easy to set up.
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Good grief, don't drop it just yet! You've got a great looking site, and you picked the best menu for it.

Now for the picky-picky...

This statement in your css...

Code: Select all

TABLE, TR, TD { font-family: Verdana, Tahoma, Arial; font-size: 8.5pt; color: #000000 }
...is overriding the menu and messing up the spacing. I also discovered that if the arrow.gif is left out the separator goes all the way to the right side. As soon as the arrow is added it shrinks. Actually, the menu itself is the proper width, it's what's inside it that has a problem.

For now I dropped the above css line, and you can see what I think you want at http://www.west.asu.edu/sa/testsite/sg/. I know just leaving that out doesn't fix your problem, but perhaps it will give you a direction (css and I don't get along!).

Also, your HTML needs some cleaning up...

1. Numerous missing " " around tag attributes.

2. Sometimes the use of ' ' instead of " ".

3. Numerous unclosed tags (<td>, <tr>, <span>, <a name...>, etc.).

PS - Don't forget many episodes of SG tonight - it's Monday...
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Sorry, I left out itemwidth="100%"; Many of us who use table bound menus have found that using that solves a lot of problems. Also, you need to get the latest release. If you login and go here http://milonic.com/forum/viewtopic.php?t=3108 and check watch this topic, you'll get an email whenever there's a new release with any new capabilities added or minor bug fixes. I downloaded and tested your page in ie5.5, ns6, 7, and firebird .07 with the itemwidth="100%"; added along with the menuwidth. It renders perfectly in them, with the arrow all the way to the right. And, I agree with John, you have a great site. I've been browsing.... Love your gate!

Ruth

PS for John, what I've done for a workaround to enable still having such coding is to make that td coding into a class and just assigning it to tables, then I just leave it out of the table I put the menu in. Works on my browsers but not sure about macs since I don't have one. Got one to give away so I can test my pages ? :lol:
Last edited by Ruth on Mon Mar 22, 2004 7:13 pm, edited 1 time in total.
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Yes, I'm seeing that on the mac ie it has to be perfect.

Remove all the ... from your paths, should start with a hash /

Also you might need itemwidth="100%";

Nice! I'll have to take another look at how to use my forum, any good mods?

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

Post by John »

Good catch, Ruth (as always).

I have added it to my demo link and put the line back into the css. All is well (except where I didn't call all the images on the page).

Note also that I moved the main menu code back into the JS file and placed the JS call to the _data file in the <td>.
John
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Ruth wrote:Works on my browsers but not sure about macs since I don't have one. Got one to give away so I can test my pages ? :lol:
Give away - no, but I still have my old dual 533MHz G4 available for sale... :D
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

What the heck is a G4, sounds like some guy thing, you know dual carbs? And, would it be too old to test my pages? [I just finally tossed two apple II c, I think it was c maybe one was e] :lol:

About the putting the script call in the cell, I didn't think you could do that, the directions say you can't?

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

Post by John »

Ruth wrote:What the heck is a G4, sounds like some guy thing, you know dual carbs? And, would it be too old to test my pages? [I just finally tossed two apple II c, I think it was c maybe one was e] :lol:
G4 is the chip designation (like P4 for - well, you know). Dual carbs? Yeah, you could say that - it has 2 main processor chips.

Old? No. Got it new 3 years ago, and the G4 is still a very powerful chip. I'll send you the full specs off-list.
Ruth wrote:About the putting the script call in the cell, I didn't think you could do that, the directions say you can't?
It works! At least I think my mock-up is right...
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

it works for me also, on my pc browsers, wonder what it does on the mac ie browser that Andy lists the MAC PROBLEM link in the table sample?

And, I wouldn't have any idea what the specs mean, but you can send them. If they don't say 12" wide by 8" high I'm lost. :D

Ruth
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Thanks for all the help everyone. I think I have most of it sorted out now:

http://www.sg1archive.com/index2.shtml

I still can't get it to work in IE on Mac though. Can someone take a look at what I've got and help me out?

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

Post by John »

Arcady wrote:I still can't get it to work in IE on Mac though. Can someone take a look at what I've got and help me out?
That'll have to be Maz...
John
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Ruth wrote:And, I wouldn't have any idea what the specs mean, but you can send them. If they don't say 12" wide by 8" high I'm lost. :D
Nothing so technical. Just a list of what's on the machine.
John
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Looks perfect in ie5.5, ns6, 7 and firebird .07. You are missing a semi-colon after the drawMenus() in the main table menu. Also, try downloading the newest update [keep a backup someplace of the one you have] and see if that helps with ie on the mac.


Ruth
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

I added the semi-colon.

I had version 5.07 and just upped it to 5.09, but the menu doesn't show up in Mac IE still. I tried to follow the instructions to make it work in Mac IE but maybe I missed something.

Thanks for everyone's help.
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Did you check John's link with your mac ie? See if that one loads, that could give us some more info. If it does then we need to look at your page, if it doesn't then maybe something else is a problem.

Ruth
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

I tried John's link in Mac IE and it doesn't work either. :oops:
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Hi Ruth, I have the iMac G4 love it, although I think John does have the dual carbs and probably a lot newer than mine;) They get all the best educational deals, its sad.

Hi Arcady,
I'll take another look at mac, make sure you have the latest update, there were some ie mac problems on the previous update. Mine works fine now, but one little error could be causing it not to load.

I see navigation and site news now. Almost there. you have to lose the ... before the paths on your index and in menu_data.js they should all start with a slash /

maz
Arcady
Advanced
Advanced
Posts: 15
Joined: Fri Mar 19, 2004 7:44 am
Contact:

Post by Arcady »

Maz wrote:I see navigation and site news now. Almost there.
Those aren't part of the menu script. The menu sits inside a table cell within that element.
Post Reply