Font colour

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
spiderweb
Beginner
Beginner
Posts: 7
Joined: Fri Apr 22, 2005 10:21 am

Font colour

Post by spiderweb »

HI

Downloaded the menu and installed, works fine. I made a copy of index and called it index2, I then changed the link on the first menu item to point to Index2, that too works fine.

The problem is on the index page the colour of the font is black and on index2 the colour of font is white

any ideas :? :?

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

Post by Ruth »

Not without a test page to see what's happening. It could be a style sheet, some style code on the page, it is something with a font color code someplace. Maybe it's pagecolor setting. Without a page, there's no way to know.

Ruth
spiderweb
Beginner
Beginner
Posts: 7
Joined: Fri Apr 22, 2005 10:21 am

Post by spiderweb »

Index and Index2 are identical :? :?
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

We need to see the pages, because I tried doing what you said you did and do not get that problem. Since it seems they are on your desktop, post the code for the index page and the index2 page, then for the menu data file and for any stylesheet if you have one. If you haven't posted code to a forum before, click teh code button then paste the code then click the code button again.

Ruth
spiderweb
Beginner
Beginner
Posts: 7
Joined: Fri Apr 22, 2005 10:21 am

Post by spiderweb »

index.html

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="120"  border="0" align="left" cellpadding="1" cellspacing="1">
  <tr>
    <td>
      <script type="text/javascript" src="milonic_src.js"></script>
      <div class=milonic><a href="https://milonic.com/">JavaScript Menu, DHTML Menu Powered By Milonic</a></div>
      <script	type="text/javascript">
	if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");		
	  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); 
	</script>
      <script type="text/javascript" src="menu_data.js"></script>
      <div align="center"></div></td>
  </tr>
</table>
</body>
</html>
construction.php

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<table width="120"  border="0" align="left" cellpadding="1" cellspacing="1">
  <tr>
    <td>
      <script type="text/javascript" src="milonic_src.js"></script>
      <div class=milonic><a href="https://milonic.com/">JavaScript Menu, DHTML Menu Powered By Milonic</a></div>
      <script	type="text/javascript">
	if(ns4)_d.write("<scr"+"ipt type=text/javascript src=mmenuns4.js><\/scr"+"ipt>");		
	  else _d.write("<scr"+"ipt type=text/javascript src=mmenudom.js><\/scr"+"ipt>"); 
	</script>
      <script type="text/javascript" src="menu_data.js"></script>
      <div align="center"></div></td>
  </tr>
</table>
</body>
</html>
menu_data.js

Code: Select all

_menuCloseDelay=500;
_menuOpenDelay=150;
_subOffsetTop=2;
_subOffsetLeft=-2;

with(menuStyle=new mm_style()){
onbgcolor="#547CBB";
oncolor="#ffffff";
offbgcolor="#E7EBF7";
offcolor="#000000";
bordercolor="#296488";
borderstyle="solid";
borderwidth=1;
separatorcolor="#ffffff";
separatorsize="1";
padding="5";
fontsize="7.5pt";
fontstyle="normal";
fontfamily="Verdana, Tahoma, Arial";
align="left";
pagecolor="white";
pagebgcolor="#82B6D7";
headercolor="#000000";
headerbgcolor="#ffffff";
subimage="arrow.gif";
subimagepadding="2";
overfilter="Fade(duration=0.2);Alpha(opacity=90)";
outfilter="randomdissolve(duration=0.3)";
}




with(milonic=new menuname("Main Menu")){
itemwidth="118";
menuwidth="118";
alwaysvisible=1;
position="relative";	
left=10;
overflow="scroll";
style=menuStyle;
top=10;
aI("showmenu=Components;text=Components;");
aI("showmenu=Custom Machines;text=Custom Machines;");
aI("showmenu=Laptops;text=Laptops;");
aI("showmenu=Printers;text=Printers;");
aI("showmenu=Scanners;text=Scanners;");
aI("showmenu=Accessories;text=Accessories;");
aI("showmenu=Consumables;text=Consumables;");
aI("showmenu=Disks;text=Disks;");
}

with(milonic=new menuname("Components")){
overflow="scroll";
style=menuStyle;
aI("text=Central Processing Unit (CPU);url=construction.php;")
aI("text=Hard Drives;url=construction.php;")
aI("text=MotherBoards;url=construction.php;")
aI("text=CD/DVD;url=construction.php;")
aI("text=Memory;url=construction.php;")
aI("text=Multimedia;url=construction.php;")
aI("text=Monitors;url=construction.php;")
aI("text=Keyboards;url=construction.php;")
aI("text=Mice;url=construction.php;")
}

with(milonic=new menuname("Consumables")){
style=menuStyle;
aI("text=Inks;url=construction.php;");
aI("text=Data Cartridges;url=construction.php;");
aI("text=Paper;url=construction.php;");
aI("text=CD Cases;url=construction.php;");
}

with(milonic=new menuname("Disks")){
style=menuStyle;
aI("status=Disks;text=Disks;url=construction.php;");
}

with(milonic=new menuname("Printers")){
style=menuStyle;
aI("status=Printers;text=Printers;url=construction.php;");

}

with(milonic=new menuname("Scanners")){
style=menuStyle;
aI("status=Scanners;text=Scanners;url=construction.php;");

}

with(milonic=new menuname("Laptops")){
style=menuStyle;
aI("status=Laptops;text=Laptops;url=construction.php;");

}

with(milonic=new menuname("Custom Machines")){
style=menuStyle;
aI("showmenu=Machines Type;status=Custom Machines;text=Custom Machines;");
}
     with(milonic=new menuname("Machines Type")){
     style=menuStyle;
     aI("status=Custom Built Machines;text=Budget Machines;url=construction.php;");
     aI("status=Mid Range Machines;text=Mid Range Machines;url=construction.php;");
     aI("status=Premium Machines;text=Premium Machines;url=construction.php;");
     }

with(milonic=new menuname("Accessories")){
style=menuStyle;
aI("status=Accessories;text=Accessories;url=construction.php;");

}

drawMenus();

Any help would be appreciated :?
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 spiderweb,

Quick glance... I'd say it's because of pagecolor="white" in your menuStyle. When you're on index.htm, the menu item with url=index2.htm does not match the current page's url. But when you're on index2.htm, the menu item with url=index2.htm does match the current page's url, which triggers the pagecolor property. pagebgcolor would also be triggered. Remove those properties from the stye and you'll have no more page matching.

Cheers,

Kevin
spiderweb
Beginner
Beginner
Posts: 7
Joined: Fri Apr 22, 2005 10:21 am

Post by spiderweb »

Thanks kevin that has solved the font colour problem :D , but i still get a different shade of blue for the buttons background on index2 :cry:

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

Post by Ruth »

Hi

pagebgcolor and pagecolor are where you set the 'highlighting' If you want your menu to show the user where they are, you would set these colors. Right now you have them set at pagecolor="white" which makes the font white and pagebgcolor=#82B6D7 which makes the background that different blue. Since all your links go to construction.php in the test menu the whole menu will highlight reading that 'matching' for every item :)

Ruth
spiderweb
Beginner
Beginner
Posts: 7
Joined: Fri Apr 22, 2005 10:21 am

Post by spiderweb »

So the problem should dissapear once i have added all the other pages?

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

Post by Ruth »

If you leave in the pagecolor and pagebgcolor then any pages that 'match' the particular link you clicked in the menu to get to them will use that as a 'breadcrumb' i.e. highlighting where the person is in the menu. If you don't want that at all, just remove those two items. You can also change the items to whatever colors you want. You can even just use one of them, perhaps you only want the font color to change to indicate where someone is, then just put // in front of the pagebgcolor= part and it will disable it.

Ruth
Post Reply