title: tip bottom right to input field should be responsive
body: <p>I am new to CSS.</p>
  
  <p>Trying to align these input field validation tooltip this is fiddle:
  <a href="http://jsfiddle.net/fade3r5f/" rel="nofollow noreferrer"><strong>http://jsfiddle.net/fade3r5f/</strong></a></p>
  
  <p>can anyone help how can I do this.? I can able to move it to left and right but cant able to do like shown in the below image </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>body {
    padding: 5em 3em;
  }
  input {
    padding: .5em;
  }
  
  p {
    position: relative;
  }
  .error {
    position: absolute;
    top: -3.5em;
    left: 0;
    padding: .5em 1em .4em;
    background-color: #f66;
    border: 1px solid #f00;
    border-radius: 5px;
    color: #fff;
  }
  .error::after,
  .error::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 15px;
    border: solid transparent;
  }
  .error::after {
    margin-left: 1px;
    border-top-color: #f66;
    border-width: 7px;
  }
  .error::before {
    border-top-color: #f00;
    border-width: 8px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;
    &lt;input type="text" size="40" /&gt;
    &lt;span class="error"&gt;Please enter text&lt;/span&gt;
  &lt;/p&gt;
  
  &lt;p&gt;
    &lt;input type="email" size="40" /&gt;
    &lt;span class="error"&gt;Please enter email&lt;/span&gt;
  &lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><strong>I am trying something like this (but it should come bottom to input field):</strong></p>
  
  <p><a href="https://i.stack.imgur.com/1oupE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1oupE.png" alt="enter image description here"></a> </p>