vote up 1 vote down
star

How do I set the color of the font in the header menu?

I wish to have a font color #1 for the header menu, and a font color #2 when roll-over.

How can I do that?

flag

2 Answers

vote up 2 vote down
check

Here is some CSS to get you started. I'd recommend picking slightly less harsh colours though.

/*set the default header to blue background and white text*/
.nav li a {
	background: #0000FF;
	color: #FFFFFF;
}

/*set the selected header to red background and mid-grey text*/
.nav .youarehere {
	color: #555555;
	background: #FF0000;
}

/*set the hover header to green background and dark-grey text*/
.nav li a:hover {
	color: #222222;
	background: #00FF00;
}
link|flag
@Rich Seller Thanks a lot. It works for the background color. But for the text font color, it stays always white. I don't think I am getting the mid-grey or dark-grey text. – tucson Feb 4 at 18:57
it worked ok on my test page. I'll have another look in the morning – Rich Seller Feb 4 at 22:53
try this version, it is more specific than the original as it selects the nested a – Rich Seller Feb 7 at 13:13
Yep, it works perfect! Thank you Rich. – tucson Feb 7 at 14:06
vote up 0 vote down

Same answer as your other question, use firebug to figure out the css controlling the color.

link|flag

Your Answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.