I have a list with an element that should hang when it hangs. This works fine for me, as shown below:
li.test:hover { text-decoration: underline }
However, this list item contains a different list, and using the CSS rule above, all list items in the child list also become underlined. I would like to emphasize only the first li (the one that actually hangs). I tried using child selectors, but I did not find anything that worked (although this is probably really obvious).
How to apply a style only to the current element, and not to its children?
Jsfiddle: http://jsfiddle.net/Mansfield/2CtFW/
source share