Confusion in CSS Selectors

hello all,

i want to learn how to write nested CSS selectors like

#menu>ul>li:hover>a span

any link with the example will be most helpful.

thankyou

http://www.w3schools.com/cssref/css_selectors.asp

Hi,

You can read about combinators in the Sitepoint reference or [URL=“http://reference.sitepoint.com/css/combinators”]more specifically here.

If the question is about the child selector of which the combinator is the > sign then that simply matches all elements that are the immediate children of a specified element whereas a descendant selector matches all children.

The child selector is useful in dropdown menus because you limit the scope to the immediate children and not interfere with any nested submenus of which their could be many.