title: Move label of input box when a user focuses on this without require
body: <p>I want to move a label above an input box when a user focuses on the input box. <a href="https://stackoverflow.com/questions/42233488/move-placeholder-above-the-input-on-focus">There is an answer here</a>, however, there are some differences. I can't use required as I am using custom validations. Also, there is more than one input box.</p>
  
  <p>See my code below. I must be missing something silly.</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>.field {
    position: relative;
    padding-top: 10px;
  }
  
  .form label {
    position: absolute;
    top: 8px;
    left: 10px;
    pointer-events: none;
  }
  
  input:focus ~ label {
    top: -6px;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;form class="form"&gt;
  
    &lt;div class="field"&gt;
      &lt;label&gt;Name&lt;/label&gt;
      &lt;input type="text"&gt;
    &lt;/div&gt;
  
    &lt;div class="field"&gt;
      &lt;label&gt;Age&lt;/label&gt;
      &lt;input type="text"&gt;
    &lt;/div&gt;
  
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>