title: How to get a border on top of another border in css?
body: <p>I'm trying to create a navigation bar, where by default it has a <code>border-top</code> of a certain color, and when either hovered or active, I wanted another color to go on top of it. </p>
  
  <p>Is there any method that I can make this to work? </p>
  
  <p>I've tried:</p>
  
  <ul>
  <li><code>absolute</code></li>
  <li><code>z-index</code></li>
  </ul>
  
  <p>but neither works for me.</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 {
      background-color: #ecf0f1;
  }
  .navbar &gt; .main-nav &gt; ul,li {
      list-style-type: none;
      text-decoration: none;
  }
  .navbar &gt; .main-nav &gt; ul {
      min-height: 60px;
      margin: 0;
      padding: 0;
      overflow: hidden;
      background-color: #ecf0f1;
      border-top: 5px solid #d1d064;
      box-sizing:border-box;
  }
  .navbar &gt; .main-nav &gt; ul &gt; li {
      text-align: center;
      min-width: 150px;
  }
  .navbar &gt; .main-nav &gt; ul &gt; li &gt; a {
      display: block;
      color: #737373;
      text-align: center;
      padding: 20px 16px;
      text-decoration: none;
      font-family: 'Lato', sans-serif;
      font-weight: 800;
  }
  .navbar &gt; .main-nav &gt; ul &gt; li.active {
      border-top: thick solid #0F9E5E;
  }
  .navbar &gt; .main-nav {
      max-width: 1480px;
      margin: 0 auto;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;head&gt;
      &lt;meta charset="UTF-8"&gt;
      &lt;link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet"&gt;
      &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/hover.css/2.1.0/css/hover-min.css" rel="stylesheet"&gt;
  &lt;/head&gt;  
  &lt;nav class="navbar"&gt;
          &lt;div class="main-nav"&gt;
              &lt;ul&gt;
                  &lt;li class="active hvr-sweep-to-top"&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="hvr-overline-from-center"&gt;&lt;a href="#"&gt;Second&lt;/a&gt;&lt;/li&gt;
                  &lt;li class="hvr-overline-from-center"&gt;&lt;a href="#"&gt;Third&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/nav&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><em>EDIT: Accidentally attached the wrong code in, I've fixed it now.</em></p>