Change color in a particular area of border-bottom during hover - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Color

Description

Change color in a particular area of border-bottom during 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">

ul {<!--from w w  w .ja  v  a 2 s . co  m-->
   list-style:none;
   text-align:center;
   border-bottom: 3px solid #000;
   margin:0;
   padding:0;
}
li:hover a {
   color: #d02027;
   border-bottom: 3px solid red;
   margin-bottom:-3px;
}
a {
   font-size: 14px;
   color: #000;
   padding: 6px 12px 6px 12px;
   text-transform: uppercase;
   text-decoration: none;
   display: block;
}
li {
   padding: 0 5px;
   display: inline-block;
}


      </style> 
 </head> 
 <body> 
  <ul> 
   <li> <a href="#">Link</a> </li> 
   <li> <a href="#">Link</a> </li> 
   <li> <a href="#">Link</a> </li> 
  </ul>  
 </body>
</html>

Related Tutorials