JSFiddle - React, Tailwind, and code Playground

HTML

<table>
    <tr>
        <td>short</td>
        <td>longer</td>
        <td>the longest cell ever seen on the surface of the earth</td>
    </tr>
</table>

JavaScript

var max = 0,
    cells = document.querySelectorAll('td');

Array.prototype.forEach.call(cells, function(cell){
    var width = cell.offsetWidth;
    max = max < width ? width : max;
});

var table = document.querySelector('table'),
    uom = 'px';

if (table.offsetWidth < max * cells.length) {
    max = 100 / cells.length;
    uom = '%';
}

Array.prototype.forEach.call(cells, function(cell){
    cell.setAttribute('style','width:' + max + uom);
});