title: how to add hover effects to bootstrap navigation menu
body: <p>Hi guys i am new to web development and i am trying to add a hover effect to my nav menu , something like the first example in this link : <a href="https://codepen.io/Calloumi/pen/vndlH" rel="nofollow noreferrer">https://codepen.io/Calloumi/pen/vndlH</a></p>
  
  <p>I tried to implement the same idea to my bootstrap html nav menu , however mine behaves slightly in different way, only the bottom border seems to move inwards and when i hover over the Links and hovering over them also moves my menu item up. i am not sure what need to add/ change to make it work the same way</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-css lang-css prettyprint-override"><code>.navbar-light .navbar-nav .nav-link {
    text-transform: uppercase;
    text-align: center;
    font-size: 13px;
    text-decoration: none;
    background: white;
    color: black;
    font-family: "open-sans";
    transition: 0.3s ease;
    border-top: 4px solid #FFFFFF;
    border-bottom: 4px solid #FFFFFF;
    padding: 20px 0;
    margin: 0 20px;
  }
  
  .navbar-light .navbar-nav .nav-link.active,
  .navbar-light .navbar-nav .nav-link:hover {
    border-top: 4px solid #000000;
    border-bottom: 4px solid #000000;
    padding: 6px 0px;
    background: #11ADE8;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;link href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" rel="stylesheet"/&gt;
  &lt;script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;nav class="navbar fixed-top navbar-expand-md navbar-light "&gt;
  
    &lt;div class="container-fluid"&gt;
  
      &lt;a class="navbar-brand " href="#"&gt;
        &lt;img src="images/logoblue.png" alt=""&gt;
      &lt;/a&gt;
      &lt;button class="navbar-toggler first-button darken-3" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"&gt;
         &lt;div class="animated-icon1"&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
          &lt;/button&gt;
      &lt;div class="collapse navbar-collapse" id="navbarResponsive"&gt;
        &lt;ul class="navbar-nav ml-auto"&gt;
          &lt;li class="nav-item active"&gt;
            &lt;a class="nav-link" href="#"&gt;Home &lt;span class="sr-only"&gt;(current)&lt;/span&gt;&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
            &lt;a class="nav-link" href="#"&gt;Services&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
            &lt;a class="nav-link" href="#"&gt;Products&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
            &lt;a class="nav-link" href="#"&gt;Booking&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
            &lt;a class="nav-link" href="#"&gt;Prices&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
            &lt;a class="nav-link" href="#"&gt;Gallery&lt;/a&gt;
          &lt;/li&gt;
          &lt;li class="nav-item"&gt;
            &lt;a class="nav-link" href="#"&gt;Contact us&lt;/a&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
  &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Any help is much appreciated towards achieving the same hover effect to my navigation menu. </p>