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:28

Newbee question : same menu on pages with different backgrou


Poster: bobmorane
Dated: Thursday May 13 2004 - 14:24:33 BST

First of all please excuse me for my poor english.

On my site I have pages with black fonts on white background and pages with white fonts on black background. Of course I want my menu to be readable on every page, with the same fontcolor for the menu as in the rest of the page.
So do I have to make two menu_data.js files, e.g. menu_data_blackonwhite.js and menu_data_whiteonblack.js, just changing the menustyle in them (that means each time I want to change a word in a submenu I have to make exactly the same change in the other file) or is it possible to build this feature with only one menu_data.js ?

Thanks for your help.

Re: Newbee question : same menu on pages with different back


Poster: John
Dated: Thursday May 13 2004 - 15:00:45 BST

bobmorane wrote:
First of all please excuse me for my poor english.

No! No excuse necessary, as I don't see anything at all wrong with your English. :D

Yes, I think you will need two _data files. With the situation of two menus on the same page you can use just one, but yours is a bit different - completely different menus depending on the page. The only differences would be in the style definitions as you mentioned, so it wouldn't be hard to build or maintain.


Poster: Ruth
Dated: Thursday May 13 2004 - 16:12:10 BST

If you are using style sheets calling a different one for the black on white and white on black, then I believe you can do it using on and off class and only need one menu file. But, if you are not or if you are hard coding style into the head of each document then John's is the easiest solution. In the style sheet you would put a class for the color you want

Code:
.mainOff {   background-color:#000000;
      color:#ffffff;
      border: 1px #ffffff solid;}
.mainOn{background-color:#ffffff;
      color:#000000;
      border: 1px #000000 solid;}
then in the menu_data.js file you would take out the off and on bgcolor off and on color and put in onclass="mainOn"; and offclass="mainOff"; leaving the rest of the style items as they are. That should work if css is an option.
My site uses this, but much more involved. If you click here and then just click the next button you will see the page colors change and the menu changes to match and I'm only using one data file, but hardcoding the class in each page. http://www.poems2u.com/text/index510-t.htm