Skip to the content ForoHackers
Log inJoin

My CSS selector is an exceptionally literal reader of the menu

CSSFrontendWeb standards
#22936 · · Quote · Report

Hello. I want the three outer menu entries painted blue. I have four blues, because Repairs owns a little submenu and has passed its ambitions to Lenses. The rule is .outer li. I would like Lenses to mind its own business.

#22993 · · Quote · Report

@CurvaLarga try .outer > li assuming .outer is the list containing the three top-level items. if the text colour is inherited by the submenu, give its list its own colour too. matching a selector and inheriting the result aren't the same thing

#22994 · · Quote · Report

@LeSobraUnOjal The CSS inspector shows three matches now. The little one kept the colour until I set the submenu's colour, just as you said. Thumbs up.

You are not logged in, so this goes up anonymously: no account, no name and no address is stored with it, and it may carry no link and no image. Log in or join to post under your name. Our web server's logs keep the address and time of every request for up to 14 days; to keep yours out of them, use Tor. To reach the staff in confidence, use the drop. Sign as a returning source (a key kept only in this browser)

Sending takes a few seconds here: your browser first works out a proof of work against spam.

Reply