title: How to position div without space
body: <p>I have six divs in my html document.</p>
  
  <p>My problem is that last div has some top space which needs to be removed.</p>
  
  <p>This is not a duplicate question.</p>
  
  <p>This has nothing to do with inline-block spacing.</p>
  
  <p>Please help.</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-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;style&gt;
    body {
      border: 1px solid;
      padding: 0;
      margin: auto;
      height: 500px;
      width: 500px;
    }
    div {
      padding: 0;
      margin: 0;
      border: 1px solid;
      display: inline-block;
      width: 25%;
      height: 25%;
      position: relative;
    }
    div:first-child {
      background: black;
    }
  &lt;/style&gt;
  
  &lt;body&gt;
    &lt;div&gt;&lt;/div&gt;
    &lt;div&gt;&lt;/div&gt;
    &lt;div&gt;&lt;/div&gt;
    &lt;div&gt;&lt;/div&gt;
    &lt;div&gt;
    &lt;/div&gt;
    &lt;div&gt;
      &lt;div&gt;&lt;/div&gt;
    &lt;/div&gt;
    &lt;script&gt;
      var myDivs = document.querySelectorAll("div");
      myDivs[2].style.backgroundColor = "blue";
    &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>