title: How can I apply border to the top of each row in grid display?
body: <p>How can I apply border to the top of each row in grid display?
  Something like this, but in one container. I try to search this problem in Google, but did not find something like 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>.container {
    max-width: 700px;
  }
  .tab {
    border-top: 1px solid #000;
    margin-bottom: 10px;
    padding-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
          grid-gap: 5px;
          
  }
  
  .tab2 {
    border-top: 1px solid #000;
    padding-top: 10px;
    display: grid;
           
  }
  
  .item {
    width: 150px;
    height: 70px;
    background-color: green;
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;div class="container"&gt;
    &lt;div class="tab"&gt;
      &lt;div class="item"&gt;1&lt;/div&gt;
      &lt;div class="item"&gt;2&lt;/div&gt;
      &lt;div class="item"&gt;3&lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="tab2"&gt;
      &lt;div class="item"&gt;4&lt;/div&gt;
    &lt;/div&gt;
      &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>