I’m building a navigation which has unordered lists within an unordered list. I suspect that styling for the main unordered list is being mixed up with that of the sub list and vise versa. Perhaps my selectors are not the best. The navigation can be seen here: http://jsfiddle.net/W3Dzd/
The two issues that I’m having are that 1) the first line item under “sui generis” is thinner than the others – the rectangle that is that box is displaying differently. 2) when hovered, the sub navigation line item “mantels” anchor text, also under “sui generis” does not change color when hovered over.
Can someone point me int he right direction here? Is there a better selector to use?
The first problem is coming from the rule:
which I don’t understand the purpose of, but removing it fixes the problem.
The second problem comes from this rule:
It is making the “mantels” text stay white because the rules specifies any
awhich is the direct child of anliwhich is being hovered over and which is the third or seventh successiveli, which has some ancestor, not necessarily a parent who has classnavigation. Now, putting a>after.navigationfixes the problem, but I would suggest an alternative:Instead of giving the
ulinside the top-levellia class, put that class on theliitself. Then you can just have the much simpler rulesHope this helps! Oh, also I would consider just using borders to do the separators between the subnav items instead of background images.