Why is my table cell width wrong in Chrome? Why is my table cell width wrong in Chrome? google-chrome google-chrome

Why is my table cell width wrong in Chrome?


Two things you should do:

  • On the table element, use table-layout: fixed;
  • Insert columns and give them a width
    • (You could also assign width to table headers/cells of the first row)

Like this:

<table border="1" style="table-layout: fixed; width: 100%;">    <colgroup>        <col style="width: 205px;">        <col style="width: auto;">          <!-- Use "width: auto;" to apply the remaining (unused) space -->        <col style="width: 5px">    </colgroup>    <tr>        <td>1</td>        <td>2</td>        <td>3</td>    </tr>     <!-- Etc. -->