highlight entire area of list item using :hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover on list

Description

highlight entire area of list item using :hover

Demo Code

ResultView the demo in separate window

<html>
 <head> 
  <meta name="viewport" content="width=device-width, initial-scale=1"> 
  <link rel="stylesheet" type="text/css" href="https://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css"> 
  <style id="compiled-css" type="text/css">
body {<!--from  www .  j  a v a  2  s .  c  o  m-->
   background:Chartreuse;
}

ul {
   display:inline-block;
   font-size:0;
   list-style-type:none;
   background:yellow;
   border-bottom:3px solid blue;
   margin:0;
   padding:0;
}

ul li {
   display:inline-block;
   border-right:2px solid pink;
   text-align:center;
   margin:0;
   padding:0px 7px;
   font:16px/2.626em "Helvetica Neue", Helvetica, sans-serif;
}

ul li a {
   color:OrangeRed;
   text-decoration:none;
}

ul li:hover {
   background-color:grey;
}

ul li.next {
   border-right:0;
}

ul li.next:after {
   content:"\f55";
   font-family:FontAwesome;
   font-size:13px;
}
</style> 
 </head> 
 <body> 
  <ul> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li> <a href="#">L</a> </li> 
   <li class="next"> <a href="#">Lore</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials