Milonic provide full featured pull down web menus for some of the worlds largest companies
click here to see what it can do for you

Download Milonic DHTML Menu
Buy Milonic DHTML Menu

Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:42

Background color question


Poster: mark1
Dated: Sunday June 5 2005 - 14:21:20 BST

I have searched the post and help files but can not find the answer. It must be so simple everyone but me knows.

My problem is, my menus look great until I changed the background color of the table they are in to white. Now the menu items with sub menus are white and menu items with links are OK. Any suggestions.

Here is the messy menu_data file to be cleaned up later:
Code:
_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=5;
_subOffsetLeft=2;


with(menuStyle=new mm_style()){
bordercolor="#445A19";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="10px";
fontweight="bold"
fontstyle="normal";
headerbgcolor="#88D14F";
headercolor="#000000";
offbgcolor="#88D14F";
offcolor="#000000";
onbgcolor="#3F5C19";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=5)";
padding="3px";
subimagepadding="2";
separatorcolor="#2D729D";
separatorsize=1;
subimage="<?php echo DIR_FULL_TOOLS; ?>arrow.gif";
onsubimage="<?php echo DIR_FULL_TOOLS; ?>onarrow.gif";
subimagepadding=2;
}

with(SubmenuStyle=new mm_style()){
bordercolor="#445A19";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="10px";
fontweight="bold";
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#88D14F";
offbgcolor="#88D14F";
offcolor="#000000";
onbgcolor="#3F5C19";
oncolor="#ffffff";
outfilter="randomdissolve(duration=0.3)";
overfilter="Fade(duration=0.2);Alpha(opacity=90);Shadow(color=#777777', Direction=135, Strength=5)";
padding="3px 6px 3px 6px";
subimagepadding="2";
separatorcolor="#2D729D";
separatorsize=1;
subimage="<?php echo DIR_FULL_TOOLS; ?>arrow.gif";
onsubimage="<?php echo DIR_FULL_TOOLS; ?>onarrow.gif";
subimagepadding=2;
}

with(Slidemenu=new mm_style()){
bordercolor="#445A19";
borderstyle="solid";
borderwidth=1;
fontfamily="Verdana, Tahoma, Arial";
fontsize="10px";
fontweight="bold"
fontstyle="normal";
headerbgcolor="#ffffff";
headercolor="#000000";
offbgcolor="#ffffff";
offcolor="#000000";
onbgcolor="#ffffff";
oncolor="#000000";
padding=3;
separatorcolor="#445A19";
separatorsize=1;
}


//*************************************************
with(milonic=new menuname("aboutus")){
overflow="scroll";
style=SubmenuStyle;
aI("text=Our Mission;url=<?php echo HTTP_SERVER; ?>mission.php;");
aI("text=ABNC History;url=<?php echo HTTP_SERVER; ?>history.php;")
aI("text=Meet the Staff;url=<?php echo HTTP_SERVER; ?>abnc-staff.php;")
aI("text=Information & FAQ;url=<?php echo HTTP_SERVER; ?>faq.php;");
aI("text=Location and Hours;url=<?php echo HTTP_SERVER; ?>location.php;");
aI("text=Board of Trustees;url=<?php echo HTTP_SERVER; ?>trustees.php;");
aI("text=Foundation Board;url=<?php echo HTTP_SERVER; ?>foundation.php;");
}
//*************************************************

with(milonic=new menuname("activities")){
style=SubmenuStyle;
//aI("text=Fun and Educational Exhibits;url=<?php echo DIR_FULL_ACTIVITIES; ?>;");
aI("text=Birthday Parties;url=<?php echo DIR_FULL_ACTIVITIES; ?>birthday.php;");
aI("text=Guided Canoe Tours;url=<?php echo DIR_FULL_ACTIVITIES; ?>canoe-tour.php;");
aI("text=Pontoon Boat Cruise;url=<?php echo DIR_FULL_ACTIVITIES; ?>pontoon-cruise.php;");
aI("text=Prairie Night Ride;url=<?php echo DIR_FULL_ACTIVITIES; ?>prairie-ride.php;");
aI("text=Owl Prowl;url=<?php echo DIR_FULL_ACTIVITIES; ?>owl-prowl.php;");
//aI("text=Creepy Crowler Night;url=<?php echo DIR_FULL_ACTIVITIES; ?>creepy-crawler-night.php;");
//aI("text=Fall Festival;url=<?php echo DIR_FULL_ACTIVITIES; ?>fall-festival.php;");
}

with(milonic=new menuname("special")){
style=SubmenuStyle;
//aI("text=Annual Special Events &amp; Programs;url=<?php echo DIR_FULL_ACTIVITIES; ?>special-events.php;");
//aI("text=Creepy Crowler Night;url=<?php echo DIR_FULL_ACTIVITIES; ?>creepy-crawler-night.php;");
//aI("text=Fall Festival;url=<?php echo DIR_FULL_ACTIVITIES; ?>fall-festival.php;");
}

with(milonic=new menuname("boatcruise")){
style=SubmenuStyle;
aI("text=;url=<?php echo DIR_FULL_ACTIVITIES; ?>cruise-breakfast.php;");
aI("text=;url=<?php echo DIR_FULL_ACTIVITIES; ?>cruise-moonlight.php;");
aI("text=;url=<?php echo DIR_FULL_ACTIVITIES; ?>cruise-sunset.php;");
}
//*************************************************

with(milonic=new menuname("education")){
style=SubmenuStyle;
aI("text=Educational Information;url=<?php echo DIR_FULL_EDUCATION; ?>;");
aI("text=School Field Trips;url=<?php echo DIR_FULL_EDUCATION; ?>programs.php;");
aI("text=EcoExplorations;url=<?php echo DIR_FULL_EDUCATION; ?>EcoExplorations.php;");
aI("text=Camps;showmenu=camps;");
aI("text=Scouts;url=<?php echo DIR_FULL_EDUCATION; ?>scouting.php;");
aI("text=Wetlands Education Curriculum;showmenu=ecology;");
aI("text=School Organization;url=<?php echo DIR_FULL_EDUCATION; ?>outreach.php;");
//aI("text=Registration Information;url=<?php echo DIR_FULL_EDUCATION; ?>registration-information.php;");
}


with(milonic=new menuname("camps")){
style=SubmenuStyle;
aI("text=EcoCamp;url=<?php echo DIR_FULL_EDUCATION; ?>ecology-camp.php;");
aI("text=Winter Camp;url=<?php echo DIR_FULL_EDUCATION; ?>winter-camp.php;");
}
//*************************************************

with(milonic=new menuname("support")){
style=SubmenuStyle;
aI("text=Volunteering;showmenu=Volunteer;");
aI("text=Memberships;showmenu=Memberships;");
aI("text=Donations;url=<?php echo DIR_FULL_SUPPORT; ?>;");
//aI("text=Personal Support;url=<?php echo DIR_FULL_SUPPORT; ?>personal-support.php;");
//aI("text=Corporate Support;url=<?php echo DIR_FULL_SUPPORT; ?>corporate-support.php;");
aI("text=Wish List;url=<?php echo DIR_FULL_SUPPORT; ?>wish-list.php;");
aI("text=Gifts & Souvenirs;url=<?php echo DIR_FULL_SUPPORT; ?>gift-shop.php;");
}

with(milonic=new menuname("Memberships")){
style=SubmenuStyle;
aI("text=Individuals;url=<?php echo DIR_FULL_SUPPORT; ?>individual-membership.php;");
aI("text=Corporate;url=<?php echo DIR_FULL_SUPPORT; ?>coporate-membership.php;");
}

with(milonic=new menuname("Volunteer")){
style=SubmenuStyle;
aI("text=Individuals ;url=<?php echo DIR_FULL_SUPPORT; ?>individual-volunteer.php;");
aI("text=Groups;url=<?php echo DIR_FULL_SUPPORT; ?>group-volunteer.php;");
}
//*************************************************

with(milonic=new menuname("ecology")){
style=SubmenuStyle;
aI("text=Introduction;url=<?php echo DIR_FULL_ECOSYSTEM; ?>Introduction.php;");
aI("text=Wetlands - What They Are;url=<?php echo DIR_FULL_ECOSYSTEM; ?>wetlands-what-are-they.php;");
aI("text=ABNC&amp;s Wetlands Complex;url=<?php echo DIR_FULL_ECOSYSTEM; ?>ABNC-wetlands-complex.php;");
aI("text=Significance of Wetlands;url=<?php echo DIR_FULL_ECOSYSTEM; ?>significance-of-wetlands.php;");
aI("text=Why Worry About Wetlands;url=<?php echo DIR_FULL_ECOSYSTEM; ?>why-worry-about-wetlands.php;");
aI("text=We All Can Protect our Valuable Wetlands;url=<?php echo DIR_FULL_ECOSYSTEM; ?>protect-our-wetlands.php;");
aI("text=Appendix 1;url=<?php echo DIR_FULL_ECOSYSTEM; ?>wetlands-field-guide-references-1.php;");
//aI("text=Appendix 2;url=<?php echo DIR_FULL_ECOSYSTEM; ?>.php;");
aI("text=Appendix 3;url=<?php echo DIR_FULL_ECOSYSTEM; ?>wetlands-field-guide-references-3.php;");
aI("text=Appendix 4;url=<?php echo DIR_FULL_ECOSYSTEM; ?>wetlands-field-guide-references-4.php;");
//aI("text=;url=<?php echo DIR_FULL_ECOSYSTEM; ?>.php;");
}
//*************************************************


with(milonic=new menuname("stewardship")){
style=SubmenuStyle;
aI("text=ABNC Habitats;url=<?php echo DIR_FULL_ECOSYSTEM; ?>ABNC-wetlands-complex.php;");
aI("text=Conservation and Preservation;url=<?php echo DIR_FULL_STEWARDSHIP; ?>;");
aI("text=Prairie Restoration;url=<?php echo DIR_FULL_STEWARDSHIP; ?>prairie-restoration.php;");
aI("text=Prescribed Burns;url=<?php echo DIR_FULL_STEWARDSHIP; ?>prescribed-burns.php;");
aI("text=Bayou Restoration;url=<?php echo DIR_FULL_STEWARDSHIP; ?>bayou-restoration.php;");
//aI("text=;url=<?php echo DIR_FULL_STEWARDSHIP; ?>;");
}
//*************************************************

with(milonic=new menuname("tours")){
style=SubmenuStyle;
aI("text=Armand Bayou Nature Center;url=<?php echo DIR_FULL_ABNC_TOUR_PAGES . ABNC_TOUR_FILE_MAP; ?>;");
aI("text=Armand Bayou;url=<?php echo DIR_FULL_PADDLE_TOUR_PAGES . BAYOU_TOUR_FILE_MAP; ?>;");
}
//*************************************************

with(milonic=new menuname("rental")){
overflow="scroll";
style=SubmenuStyle;
aI("text=Rental Information;url=<?php echo DIR_FULL_RENTALS; ?>;");
aI("text=Auditorium or Classrooms;url=<?php echo DIR_FULL_RENTALS; ?>auditorium.php;");
aI("text=Martyn Farm Site;url=<?php echo DIR_FULL_RENTALS; ?>farm-house.php;");
aI("text=Special Charter Cruises;url=<?php echo DIR_FULL_RENTALS; ?>cruises.php;");
}



drawMenus();


Poster: Ruth
Dated: Sunday June 5 2005 - 14:56:57 BST

Hi Mark,

We need the html page code and any css to be able to test. Do you have a test page by chance?

Ruth


Poster: mark1
Dated: Sunday June 5 2005 - 17:58:50 BST

Sure Ruth

I do a little volunteer work form time to time and use my website to develop website for non-profit organizations. I am redesigning this for http://www.abnc.org.

I had hoped I would not have to put my website here but here goes.
http://markglassonline.com

Thanks for the help.
Mark


Poster: Ruth
Dated: Sunday June 5 2005 - 18:21:44 BST

Hi Mark,

If you don't like posting the links you can just post the html and css in code tags, though a link is easier for us.

The problem is in the css, in particular
Code:
TABLE {
   BACKGROUND-COLOR: #ffffff
}
You have the oncolor=#ffffff, that means the background becomes white because of the use of that generic table coding in the css, and when you mouseover the text becomes white. The only thing I can suggest is that you change that generic table background section to a class.

Ruth


Poster: mark1
Dated: Sunday June 5 2005 - 19:03:01 BST

Ruth Thanks for the quick response.
They wanted a different background color or image for the body that would flank both sides of the main table. This would only be seen by people who use a wider screen resolution. That is why I set table background to white. I will use the body tag to set the color or image.

I don't understand why the menus work great with no background color and become white with a white background color. Where do I set the bgcolor for the menu items that have submenus? These seem to be the only menu items that have the problem. I have sear

Thanks,
Mark


Poster: Ruth
Dated: Sunday June 5 2005 - 19:28:26 BST

Hi Mark,

You are getting into areas that I don't really have the knowledge to explain. I sort of understand why it's happening, but not the indepth knowledge to be able to explain it. Somewhere in the menu programming, to get the menu to function as it does, i.e. it's layout, horizontal, vertical etc., tables are used. For some reason, when you code the generic table codes in css the program grabs them. If you code as a class, like .td, .tr. etc, then it doesn't affect the menu. It doesn't affect the items that are actual links [now I'm more or less assuming since I don't know programming] because of something in the programming for your menuStyle codes, like on/off bgcolor etc., that is telling it to apply to the href. I don't know if it would be possible to put something in for tables, but that could cause a real problem, since a lot of people actually put things link tables in an aI string, and you'd have problems with some of the forms for people who set them up in tables in the aI strings.

Instead of hardcoding in the body tag, why not just put background-color:#ffffff; in your css body section? If you were using a background image, you could put that there, and neither of those would affect the menu and would apply to everything. If it turns out you need the table to have a white background, while the body is different, then I can only suggest, since this is the main surrounding table, that you make a class .tablemain or that you hardcode the actual table cellpadding="0" bgcolor="#ffffff" I think that will work in most browsers.

Ruth


Poster: mark1
Dated: Monday June 6 2005 - 13:43:36 BST

Thanks Ruth, great explanation. I got it now. It was not a simple as I had hoped but simple enough to fix. You have been a great help.

Mark