change font color on text in main menu?

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

change font color on text in main menu?

Post by rudy »

I want to change the font color on the word "Logout" to the color red on the last line of the following code:

Code: Select all

with(milonic=new menuname("Main Menu")){
style=windows98style;
top=7;
screenposition="center";
alwaysvisible=1;
orientation="horizontal";
aI("text=Motherboards;showmenu=Motherboards;status=Getting to Know Your Motherboard");
aI("text=Drag-n-Drop;showmenu=Drag and Drop;status=Drag-n-Drop Components to the Motherboard;");
aI("text=A+ Jeopardy;showmenu=AP Jeopardy;status=A+ Jeopardy;");
aI("text=Search Engine;showmenu=Acronyms;status=Extensive Acronym Lookup and Glossary of Computer Terms;");
aI("text=Hard Drives;showmenu=Hard Drive;status=Understanding Hard Drives;");
aI("text=Logout;url=http://www.networkdriven.com/index22.html;status=Back To Home Page;");
}
I want to use the correct syntax so that it should work in all browsers if possible. My first thought is to do it like this:

Code: Select all

aI("text=<font color="#FF0000">Logout</font>;url=http://www.networkdriven.com/index22.html;status=Back To Home Page;");
but I don't know if this will work or work in all browsers?

Your help would be appreciated :D
Rudy
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

You can change oncolor=#FF0000; and offcolor=#FF0000; or whatever color you want by adding it to the menu item.

Just don't include the quotes.

maz
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Change font color

Post by rudy »

Thanks Maz for the quick reply.

What I didn't explain very well was that I need the text to be red all the time, not just when moused-over.
Rudy
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

Hi Rudy,
If you use what Maz gave you then it would be red all the time since both the on and off color would be the same.

Ruth
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Post by rudy »

Dah :oops:

My appologies to Maz and Ruth...

Didn't notice that the color code ff0000 was the same for both on and off.

Thanks to you both !!!
Rudy
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Change font color of text

Post by rudy »

I have tried adding the oncolor and offcolor as follows but obviously this is not correct...

Any help appreciated...

aI("text=oncolor=#FF0000;Logout; offcolor=#FF0000;url=http://www.networkdriven.com/index22.html;status=Back To Home Page;");
}
Rudy
User avatar
Maz
Milonic God
Milonic God
Posts: 1717
Joined: Fri Jun 06, 2003 11:39 pm
Location: San Francisco
Contact:

Post by Maz »

Rudy,

keep it simple ;)

aI("text=Logout;oncolor=#FF0000;offcolor=#FF0000;url=http://www.networkdriven.com/index22.html;status=Back To Home Page;");
}

Most styles can be added to a single menu item like this.

maz
User avatar
rudy
Mega User
Mega User
Posts: 161
Joined: Thu Jan 15, 2004 11:39 pm
Location: Scottsdale, Arizona
Contact:

Change font color

Post by rudy »

Thanks Maz,

That did the trick :D

Glad your here to help us out!!!
Rudy
Post Reply