I am trying to change the background color of one list item while there is another background color for other list items.
This is what I have:
1) You can use the !important rule, like this:
.selected
{
background-color:red !important;
}
See http://www.w3.org/TR/CSS2/cascade.html#important-rules for more info.
2) In your example you can also get the red background by using ul.nav li.selected instead of just .selected. This makes the selector more specific.
See http://www.w3.org/TR/CSS2/cascade.html#specificity for more info.