JSFiddle - React, Tailwind, and code Playground

by jamessouth

HTML

<h1>Table Cell Test</h1>
<h2>CSS Hack</h2>

<div>
    <div>
        <div>Cell One</div>
        <div>Cell Two</div>
    </div>
</div>

<h2>Native Table</h2>

<table>
    <tr>
        <td>Cell One</td>
        <td>Cell Two</td>
    </tr>
</table>

CSS

/*
 * Hack
 */
div {
    background-color:#000;
    color:#fff;
    display:table;
    width:100%;
    table-layout: fixed;.
}
div > div {
    display:table-row;
}
div > div > div {
    display:table-cell;
}
div > div > div:first-child {
    background-color:blue;
}

/*
 * Tables
 */
table{
    background-color:#000;
    color:#fff;
    width:100%;
}

table td:first-child {
    background-color:blue;
}