Targetting li elements within a parent li

Hi everyone,

I would be grateful for any help with this as I have tried various combinations but can’t get it to work.

I want the dropdown in the navigation on this page http://www.gravesendctc.org.uk/riderecord/Ride-record-page.html
to be always white, not just on rollover.

I want it to be like it is on this page http://www.gravesendctc.org.uk/index.html (but this navbar is a javascript one)

Could someone please take a look at my CSS and see what I need to do http://www.gravesendctc.org.uk/riderecord/css/riderecordstyles.css

Thanks very much
from
Richard

Hi,

Change this rule:


nav ul li:hover a { color: #00C !important; }

To this rule:


nav ul li:hover > a { color: #00C !important; }

(Note the child selector (>) is only supported in IE7+ but I guess seeing as you don’t have the html5 shiv in place that you are only supporting IE9+ anyway.)

Don’t throw !important around as its not really needed if you get the specificity right and just complicates issue unless you know why you used it.

Thanks ever so much, I thought it would be something simple! and thanks for the tip about the ‘important!’.
from
Richard