Force menus to fit cell width

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
psdbanana
Beginner
Beginner
Posts: 6
Joined: Fri Sep 29, 2006 1:26 pm

Force menus to fit cell width

Post by psdbanana »

I have embedded the DHTML menu in a table cell, and it works great. I need to figure out a way to resize the menus hight to fit the boundries of the cell. For example see the attached images:

Image

I need to stretch the menus to fit the entire cell width. Thanks
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi,

You'll need to post the main menu code so we can see what you have, and do you want that to go all the way across, the image doesn't really tell us the table layout and where the menu is in it, etc. Without any of that, I can only suggest you try using menuwidth="100%"; or if that's a fixed width table cell then whatever the width is, also you need to check on your padding in any css and the table cell padding in that table. If you have any kind of padding then the menu won't over-ride that.

Ruth
psdbanana
Beginner
Beginner
Posts: 6
Joined: Fri Sep 29, 2006 1:26 pm

Post by psdbanana »

Thank you for your help.

Here is my menu_data.js code:

Code: Select all

fixMozillaZIndex=true; //Fixes Z-Index problem  with Mozilla browsers but causes odd scrolling problem, toggle to see if it helps
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;




with(menuStyle=new mm_style()){
bordercolor="#999999";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="75%";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#eeeeee";
offcolor="#000000";
onbgcolor="#ddffdd";
oncolor="#000099";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=3)";
padding=4;
pagebgcolor="#82B6D7";
pagecolor="black";
separatorcolor="#999999";
separatorsize=1;
subimage="images/spartan.gif";
subimagepadding=2;
}

with(milonic=new menuname("Home")){
overflow="scroll";
style=menuStyle;
aI("text=Lakewood Home Page;url=http://www.lakewood-hs.pinellas.k12.fl.us;")
aI("text=Lakewood Portal Server;url=http://portal.lakewood-hs.pinellas.k12.fl.us;")
}

with(milonic=new menuname("Pinellas_District")){
overflow="scroll";
style=menuStyle;
aI("text=PCSB Homepage;url=http://www.pcsb.org;")
aI("text=PCSB E-Mail;url=http://mail.pcsb.org/exchange;")
}

with(milonic=new menuname("Information")){
style=menuStyle;
aI("text=Administration;url=http://www.lakewood-hs.pinellas.k12.fl.us/admin.htm;");
aI("text=Faculty/Staff;url=http://www.lakewood-hs.pinellas.k12.fl.us/faculty.htm;");
aI("text=Students/Parents;url=http://www.lakewood-hs.pinellas.k12.fl.us/students.htm;");
aI("text=Calendar;url=http://www.lakewood-hs.pinellas.k12.fl.us/calendar.htm;");
aI("text=Phone Tree;url=http://www.lakewood-hs.pinellas.k12.fl.us/phone.htm;");
aI("text=ESOL;url=http://www.lakewood-hs.pinellas.k12.fl.us/esol.htm;");
aI("text=Volunteers;url=http://www.lakewood-hs.pinellas.k12.fl.us/volunteers.htm;");
aI("text=Media Center;url=http://www.lakewood-hs.pinellas.k12.fl.us/mediacenter.htm;");
aI("text=Internet Agreement;url=http://www.lakewood-hs.pinellas.k12.fl.us/internetagree.htm;");
aI("text=About LHS External;url=http://www.lakewood-hs.pinellas.k12.fl.us/about.htm;");
}

with(milonic=new menuname("Academics")){
style=menuStyle;
aI("text=Curriculum;url=http://www.lakewood-hs.pinellas.k12.fl.us/curriculum.htm;");
aI("text=Course Guide;url=http://www.lakewood-hs.pinellas.k12.fl.us/courses.htm;");
aI("text=Achievements;url=http://www.lakewood-hs.pinellas.k12.fl.us/achievements.htm;");
}

with(milonic=new menuname("Athletics")){
style=menuStyle;
aI("text=Baseball;url=http://www.lakewood-hs.pinellas.k12.fl.us/baseball.htm;");
aI("text=Basketball;url=http://www.lakewood-hs.pinellas.k12.fl.us/basketball.htm;");
aI("text=Cheerleading;url=http://www.lakewood-hs.pinellas.k12.fl.us/cheerleading.htm;");
aI("text=Cross Country;url=http://www.lakewood-hs.pinellas.k12.fl.us/crosscountry.htm;");
aI("text=Football;url=http://www.lakewood-hs.pinellas.k12.fl.us/football.htm;");
aI("text=Golf;url=http://www.lakewood-hs.pinellas.k12.fl.us/golf.htm;");
aI("text=Boys Soccer;url=http://www.lakewood-hs.pinellas.k12.fl.us/bsoccer.htm;");
aI("text=Girls Soccer;url=http://www.lakewood-hs.pinellas.k12.fl.us/gsoccer.htm;");
aI("text=Softball;url=http://www.lakewood-hs.pinellas.k12.fl.us/softball.htm;");
aI("text=Swimming;url=http://www.lakewood-hs.pinellas.k12.fl.us/swimming.htm;");
aI("text=Tennis;url=http://www.lakewood-hs.pinellas.k12.fl.us/tennis.htm;");
aI("text=Track;url=http://www.lakewood-hs.pinellas.k12.fl.us/track.htm;");
aI("text=Volleyball;url=http://www.lakewood-hs.pinellas.k12.fl.us/volleyball.htm;");
aI("text=Wrestling;url=http://www.lakewood-hs.pinellas.k12.fl.us/wrestling.htm;");

}

with(milonic=new menuname("SLC")){
style=menuStyle;
aI("text=Business and Technology;url=http://www.lakewood-hs.pinellas.k12.fl.us/bat.htm;");
aI("text=Center for Advanced Technologies;url=http://www.cat.pinellas.k12.fl.us/;");
aI("text=Program for Athletic Studies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pas.htm;");
aI("text=Program for Enviornmental Technologies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pet.htm;");
aI("text=Program in Cultural Studies;url=http://www.lakewood-hs.pinellas.k12.fl.us/pics.htm;");
aI("text=Ninth Grade Community;url=http://www.lakewood-hs.pinellas.k12.fl.us/ngc.htm;");
}

drawMenus();
And as far as cell padding, There is nothing in the .css sheet, but when I define the table there is this line:

Code: Select all

	<table border="0" width="715" cellspacing="1" cellpadding="0">
Do I just remove the cellpadding="0"?

Thank You
psdbanana
Beginner
Beginner
Posts: 6
Joined: Fri Sep 29, 2006 1:26 pm

Post by psdbanana »

and also, I cannot change the menu to a fixed width because I am going to have the cell change via their display resolution. for example

Code: Select all

<table border="0" width=80% cellspacing="1" cellpadding="0">
So I need the menu to stretch to the entire cell size so it works properly on all resolutions.

Thanks
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

Hi banana,

I don't see any code for your main menu in what you posted. So, your main menu is defined: (1) in a separate .js file, (2) in inline code within the page (e.g., maybe inside a table cell), or (3) indepently of the Milonic system (e.g., images that call the popup() method. Could you please let us know which it is, and post that code too? Better yet would be if you could link us to the test page so we could have a look.

Cheers,

Kevin
Post Reply