JSFiddle - React, Tailwind, and code Playground

by sp00n82

HTML

<div>
    <ul>
        <li>
            <table>
                <thead>
                    <tr>
                        <th>The caption 1</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Here is some text</td>
                    </tr>
                </tbody>
            </table>
        </li>
        <li>
            <table>
            <thead>
                    <tr>
                        <th>The caption 2</th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                        <td>Here is some other text</td>
                    </tr>
                </tbody>
            </table>
        </li>
    </ul>
</div>

CSS

ul {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 100%;
  min-width: 500px;
}

ul li {
  margin-bottom: 20px;
  background-color: #EEEEEE;
  padding: 1em;
  border: 1px solid black;
  /* overflow: hidden; */
}

table {
  /* width: 100%; */
  min-width: 500px;
  margin-top: 1em;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid black;
}

table th,
table td {
  border: 1px solid black;
  padding: 2px;
}

table th {
  background-color: #666666;
  color: #FFFFFF;
}