title: Prevent double borders in vertical menu
body: <p>I am creating a vertical menu, my CSS style means that when I select or hover a button a border is added. The problem is that when hovering the button below the selected button a double border is created (bottom and top), like this: </p>
  
  <p><a href="https://i.stack.imgur.com/irI7a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/irI7a.png" alt="enter image description here"></a></p>
  
  <p>My code is this:</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>ul {
    list-style-type: none;
  }
  
  .selected {
    background-color: #f9f9f9;
    border: 1px solid #dcdee2;
    border-radius: 1px;
  }
  
  .card {
    cursor: pointer;
    padding: 7px 0 7px 20px;
  }
   
  .card:hover {
    background-color: #f9f9f9;
    border: 1px solid #dcdee2;
    border-radius: 1px; 
  }
  
  .selected a {
    font-weight: bold:
  }
  
  .card a {
    color: #121212;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;ul&gt;
    &lt;li class="card selected"&gt;
      &lt;a href="#"&gt;Home&lt;/a&gt;
    &lt;/li&gt;
    &lt;li class="card"&gt;
      &lt;a href="#"&gt;Information&lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>How can i fix this?</p>