Hover highlighted Link in Unordered list - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Link

Description

Hover highlighted Link in Unordered list

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">
#menu,<!--from w w  w .j  a  v  a  2s .  co  m-->
#menu li {
   padding:0;
   margin:0;
}

#menu li a {
   display:block;
   background-color:Chartreuse;
   background-position:left top;
   background-repeat:no-repeat;
   border:2px solid yellow;
   height:auto;
   width:100px;
   margin-bottom:5px;
   padding:5px 6px 5px 21px;
   color:blue;
   text-decoration:none;
}

#menu li a:hover {
   background-color:pink;
}
</style> 
 </head> 
 <body>
   Lorem ipsum d 
  <ul id="menu"> 
   <li> <a href="http://google.com">Lorem ipsum dol</a> </li> 
   <li> <a href="http://msn.com">Lorem ipsum </a> </li> 
   <li> <a href="http://twitter.com">Lorem ipsum d</a> </li> 
   <li> <a href="http://bbc.co.uk">Lorem ipsum</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials