Highlight list item when hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:UL Element

Description

Highlight list item when hover

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <style type="text/css">
#navside ul<!--from   w  ww  .j a  v a  2s.co m-->
{
   margin: 2;
   padding: 0;
   list-style-type: none;
}
#navside ul li { 
  display: block; 
}
#navside ul li a
{
   text-decoration: none;
   padding: 1em 1em;
   color: #bfaeae;
}
#navside ul li a:hover
{
   text-decoration: underline;
   color: red;
}
#navside li{
   margin-bottom:15px;
}

      </style> 
   </head> 
   <body> 
      <div id="navside"> 
         <ul> 
            <li> 
               <a href="#">test menu one</a> 
            </li> 
            <li> 
               <a href="#">test Menu one</a> 
            </li> 
         </ul> 
      </div>  
   </body>
</html>

Related Tutorials