HTML Table Rows - How to make a unique cell have 100% width? (with screenshot explanation)

In your case, you'd do something like

<tr>
  <td colspan="5">This text should be as long as the entire table's width...</td>
</tr>

The colspan attribute says how many columns the cell should take up. It should work in all browsers that support tables, as it's standard HTML.

In JavaScript, you'd set the colSpan property of the cell, or call .setAttribute("colspan", the_number_of_columns) on it. Either should work. But unless you're generating the cell dynamically, you should just include the colspan attribute in your HTML.


For one cell to span all 5 columns,

<td colspan="5">Lorem Ipsum</td>