Disabling span hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover on list

Description

Disabling span hover

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <style id="compiled-css" type="text/css">
#topnav li:nth-child(1) a:hover {
   color:Chartreuse;
}

#topnav li:nth-child(2) a:hover {
   color:yellow;
}

#topnav li:nth-child(3) a:hover {
   color:blue;
}

#topnav li:hover a {
   color:pink;
}

#topnav li:nth-child(2):hover a {
   color:OrangeRed;
}

#topnav li:nth-child(3):hover a {
   color:grey;
}
</style> <!-- w ww  .ja  v a  2 s .c o m-->
 </head> 
 <body> 
  <div id="topnav"> 
   <ul> 
    <li> <a href="a.html">Lorem ip</a> <span>Lorem i</span> </li> 
    <li> <a href="b.html">Lorem ip</a> <span>Lorem ips</span> </li> 
    <li> <a href="c.html">Lorem ip</a> <span>Lorem ips</span> </li> 
   </ul> 
  </div>  
 </body>
</html>

Related Tutorials