title: Pseudo element goes on top and not on the bottom of element
body: <p>I have a :after pseudo element to create a border bottom animation (border coming in from left to right), I used this technique several times however this time the border comes on top and not on the bottom for some reason, which I cant figure out. I tried using float and chaning the display type but it makes no different.</p>
  
  <p>Html:</p>
  
  <pre><code>  &lt;div class="search"&gt;
  
      &lt;svg viewBox="0 0 485.213 485.213"&gt;
  
              &lt;path d="M471.882,407.567L360.567,296.243c-16.586,25.795-38.536,47.734-64.331,64.321l111.324,111.324
                  c17.772,17.768,46.587,17.768,64.321,0C489.654,454.149,489.654,425.334,471.882,407.567z"/&gt;
              &lt;path d="M363.909,181.955C363.909,81.473,282.44,0,181.956,0C81.474,0,0.001,81.473,0.001,181.955s81.473,181.951,181.955,181.951
                  C282.44,363.906,363.909,282.437,363.909,181.955z M181.956,318.416c-75.252,0-136.465-61.208-136.465-136.46
                  c0-75.252,61.213-136.465,136.465-136.465c75.25,0,136.468,61.213,136.468,136.465
                  C318.424,257.208,257.206,318.416,181.956,318.416z"/&gt;
              &lt;path d="M75.817,181.955h30.322c0-41.803,34.014-75.814,75.816-75.814V75.816C123.438,75.816,75.817,123.437,75.817,181.955z"/&gt;
  
      &lt;/svg&gt;
  
      &lt;span&gt;Zoeken&lt;/span&gt;
  
    &lt;/div&gt;
  </code></pre>
  
  <p>Css:</p>
  
  <pre><code>.search {
    transition: 0.5s ease;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    width: 120px;
    height: 60px;
    float: left;
    display: block;
  }
  
  .search:after {
    content: '';
    display: block;
    height: 2px;
    width: 0;
    background: $main-color;
    transition: width .5s ease, background-color .5s ease;
    float: none;
  }
  
  .search:hover:after {
    width: 100%;
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/UCQEb.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UCQEb.jpg" alt="Visual of the problem"></a></p>
  
  <p>Here is a visual of the problem. The red line should be on the botttom.</p>