How to highlight parent li text only on :hover?

Posted by metal-gear-solid on Stack Overflow See other posts from Stack Overflow or by metal-gear-solid
Published on 2010-05-21T16:31:16Z Indexed on 2010/05/21 16:40 UTC
Read the original article Hit count: 179

Filed under:
|

How to highlight Article only on mouse over? current when i hover on Article it highlights all child item also. Is it possible to highlight Articles only

see example here http://jsbin.com/ubunu/2

<style>
  li:hover {background:red}
li li:hover {background:yellow}
</style>
</head>
<body>
  <p id="hello">Hello World</p>
  <ul>
<li>Weblog</li>
<li>Articles
   <ul>
   <li>How to Beat the Red Sox</li>
   <li>Pitching Past the 7th Inning
      <ul>
      <li>Part I</li>
      <li>Part II</li>
      </ul>
   </li>
   <li>Eighty-Five Years Isn't All That Long, Really</li>
   </ul>
</li>
<li>About</li>
</ul>

© Stack Overflow or respective owner

Related posts about css

Related posts about XHTML