I want to apply red background color to 1st li only i have tried several method but not able to get what i want:
#rightmxmenu > ul > li:first-child > {background-color:#ca212d;}
#rightmxmenu > li:first-child > {background-color:#ca212d;}
it does not affect anything
here is my code and css http://jsfiddle.net/gwdp3/1/
hope any expert can tell me what should i need to change.
You may want to try using a class selector in the css and apply it to all your "first" menu items
and in HTML use
Remove the last ">" made it for me.
Hope this helps.
Change this:
to this:
jsFiddle example
You don't need the trailing
>
.This should work just fine: