title: Bootstrap 4 Navbar Hover BG Color
body: <p>Having trouble with my navbar. On the non-mobile version (or when browser is expanded), I would like the hover on links to have a background color filled in height of the navbar instead it is only coloring partially. </p>
  
  <p>Please let me know how I can have full bg color on the hovering of each link. Thank you!</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>a,
  a:visited,
  a:hover,
  a:active {
    color: inherit;
  }
  
  
  /* Navigation Bar */
  
  .navbar {
    background-color: #303030;
  }
  
  .navbar-nav a {
    color: #ffffff;
    text-align: center;
  }
  
  .navbar .navbar-nav&gt;a:hover,
  .navbar .navbar-nav&gt;a:focus {
    color: #ffffff;
    background-color: yellow;
  }
  
  
  /*Mobile menu icon color*/
  
  .navbar .navbar-toggler {
    border-color: rgb(255, 255, 255);
  }
  
  .navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255, 0.7)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 8h24M4 16h24M4 24h24'/%3E%3C/svg%3E");
  }
  
  
  /* Branding Dimension for Mobile */
  
  .navbar-brand img {
    width: 125px;
    height: 29px;
  }
  
  @media (min-width: 576px) {
    .navbar-brand img {
      width: 195px;
      height: 45px;
    }
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!doctype html&gt;
  &lt;html lang="en"&gt;
  
  &lt;head&gt;
    &lt;!-- Required meta tags --&gt;
    &lt;meta charset="utf-8"&gt;
    &lt;meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"&gt;
  
    &lt;!-- CSS --&gt;
    &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"&gt;
    &lt;link rel="stylesheet" href="assets\css\style.css"&gt;
  
    &lt;title&gt;Street Scents&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
    &lt;nav class="navbar navbar-expand-lg"&gt;
      &lt;a class="navbar-brand" href="#"&gt;
        &lt;img src="assets/img/logo-text.png" alt=""&gt;
      &lt;/a&gt;
      &lt;button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation"&gt;
            &lt;span class="navbar-toggler-icon"&gt;&lt;/span&gt;
        &lt;/button&gt;
      &lt;div class="collapse navbar-collapse" id="navbarNavAltMarkup"&gt;
        &lt;div class="navbar-nav ml-auto"&gt;
          &lt;a class="nav-item nav-link active" href="#"&gt;Home &lt;span class="sr-only"&gt;(current)&lt;/span&gt;&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;About&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Videos&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Blog&lt;/a&gt;
          &lt;a class="nav-item nav-link" href="#"&gt;Merch&lt;/a&gt;
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/nav&gt;
  
  
  
    &lt;!-- Optional JavaScript --&gt;
    &lt;!-- Scripts --&gt;
    &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"&gt;&lt;/script&gt;
    &lt;script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>