Previous Message
Next Message

Change background color

Sent by Wade Smart on 29 May 2009 01:01


20090528 1910 GMT-5

I have a php if statement to set my menu buttons as active:

if (ID == "home"){
   print'<li class="active"><a href="navMenu.php">now</a></li>&nbsp;';
} else {
   print '<li><a href="navMenu.php">now</a></li>&nbsp;';
}

	
My css:
#navlist ul {
	margin-left:0;
	margin-top:5px;
	padding-left:40px;
	white-space:nowrap;
}

#navlist li {
	display:inline;
	font-weight:bold;
	list-style-type:none;
}

#navlist a {
	padding:10px;
}

#navlist a:link, #navlist a:visited {
	background-color:#3173B1;
	color:#FFFFFF;
	text-decoration:none;
}

#navlist a:hover {
	background-color:#555555;
	color:#FFFFFF;
	text-decoration:none;
}

..active { background-color: #555555;}


I have tried adding #navlist and various pre elements to teh .active but 
I just cant seem to get the background to change when its active.

Wade

-- 
Registered Linux User: #480675
Linux since June 2005
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: