I want simple drop-down menu. But I have one problem. I want when I hover over dropped items (drop-menu-items) my parent element (drop-menu-parent) to be colored with black, but it’s in white. I can’t explain it very well. You can see it here -> http://jsfiddle.net/YEyuP/
Share
I think this is what you need : http://jsfiddle.net/YEyuP/6/
HTML:
CSS:
explanation
What i have added is this :
‘>’ indicates a direct child…so the direct child of #cat-nav when hovered over will assign a black color to the tag.
You could have also written :
#cat-nav .drop-menu-parent:hover > a { color:#000; }And it would have worked just as well…Infact, this second bit is a better option.