Upon hovering link, add bottom border - HTML CSS CSS Widget

HTML CSS examples for CSS Widget:Hover Border

Description

Upon hovering link, add bottom border

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">
.header-nav a:hover {
   border-bottom:6px solid Chartreuse;
}

.header-nav .btn:hover {<!--from w w  w  .  j  av a 2s  . co  m-->
   border-bottom:6px solid yellow;
}
</style> 
 </head> 
 <body> 
  <nav class="container header-nav"> 
   <ul> 
    <li> <a href="#">Lore</a> </li> 
    <li> <a href="#cupcakes">Lorem ip</a> </li> 
    <li> <a href="#cakes">Lorem</a> </li> 
    <li> <a href="#events">Lorem </a> </li> 
    <li> <a href="#contacts" class="btn nav-btn">Lorem ipsu</a> </li> 
   </ul> 
   <br> 
  </nav>  
 </body>
</html>

Related Tutorials