100% width in a table - {SOLVED} -

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
kootch
Beginner
Beginner
Posts: 7
Joined: Wed Aug 24, 2005 3:02 am

100% width in a table - {SOLVED} -

Post by kootch »

IU'm having problems setting up the menu so that it spans the <td> that it's in 100%. It's bunching to one side in a wierd way.

Any suggestions? Pretty please?!?

http://www.penaltybox.com/portal/
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Code: Select all

<TD> <SCRIPT>
with(milonic=new menuname("Main Menu")){
style=menuStyle;
menuwidth="100%";
menualign="center";
alwaysvisible=1;
orientation="horizontal";
position="relative";
margin="0";
align="center";
aI("text=Home;showmenu=Home;itemwidth=10%;");
aI("text=Leafs News;showmenu=News;itemwidth=17%;");
aI("text=Blogs/Columns;showmenu=Blogs;itemwidth=18%;");
aI("text=Interactive;showmenu=Interactive;itemwidth=18%;");
aI("text=Leafs Info;showmenu=LeafsInfo;itemwidth=17%;");
aI("text=About TMLfans.ca;showmenu=AboutUs;itemwidth=20%;");
}
drawMenus();
</SCRIPT>
     
    </TD>
Try that and in your News submenu, you need to get rid of the menuwidth="100%" unless you want that particular submenu to span the whole page.

Ruth
kootch
Beginner
Beginner
Posts: 7
Joined: Wed Aug 24, 2005 3:02 am

Post by kootch »

Worked like a charm Ruth! Thanks so much!

(edited as some more problems solved)

And finally, is it possible to have the submenus span the same width as the main parent menus above them?? That should be the only issue I need to solve - then I'll buy the script and impliment it soon!
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

What browser is this? The submenu opens below the item in IE5.5, Firefox, Netscape and Opera. If you mean the text is aligning to the left of the subemnu, put align="center"; in the submenu definition, where you have the overflow="scroll";

As to the width. You could try putting in menuwidth="17%"; and also itemwidth="17%"; and test it in various browsers i.e. Macs which I can't test. It seems to work in IE, FF, NN and Opera. But, you have to be aware that if the font size is different in different browsers that is problably going to make it look different in those browsers.

You might try this link about methods and functions. Perhaps you can get a function that will have the submenu be the width of the parent item whatever it might be. I don't know about doing functions so I can't help on that. There are things listed there about getting menu positions and setting the positions and such, but it is not a tutorial. You might try a search for itemwidth or such. Sorry.

Ruth
Post Reply