JSFiddle - React, Tailwind, and code Playground

by Lalji Tadhani

HTML

<div id="wrapper">
    <table>
      <thead>
        <tr>
          <th>column1</th>
          <th>column2</th>
        </tr>
      </thead>
      <tbody>
        <tr>
          <td>row1</td>
          <td>row1</td>
        </tr>
        <tr>
          <td>row2</td>
          <td>row2</td>
        </tr>
        <tr>
          <td>row3</td>
          <td>row3</td>
        </tr>
        <tr>
          <td>row4</td>
          <td>row4</td>
        </tr>
      </tbody>
    </table>
  </div>

CSS

#wrapper {
    width: 100%;
}

table {
    border: 1px solid black;
    width: 100%;
}

th,
td {
    width: 50%;
    border: 1px solid black;
}

thead > tr {
    position: relative;
}

tbody {
    height: 80px;
    overflow: auto;
}