HTML CSS examples for CSS Widget:UL Element
Dynamically highlight a list item without highlighting its children
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> .focusNode {<!-- www. j a v a 2 s . co m--> background-color:Chartreuse; } .focusNode ul { background-color:yellow; } </style> </head> <body> <ul> <li>Lorem</li> <li class="focusNode">Lorem i <ul> <li>Lore</li> <li>Lore</li> <li>Lore</li> </ul> </li> <li>Lorem</li> </ul> </body> </html>