I saw some other examples on here on how to do this, but they all just used colspan="2" in the <th> HTML tag. In my case, I don't have any headers, so I'm trying to figure out how I'd still do this.
Any suggestions would be greatly appreciated. Here's a quick, small example of what I'm trying to do:
<table border="1">
<tbody>
<tr>
<td class="td-modal">Name:</td>
<td>Randon name</td>
</tr>
<tr>
<td class="td-modal">Project Name:</td>
<td>XYZ</td>
</tr>
<tr>
<td class="td-modal">Proj #:</td>
<td>12345</td>
</tr>
</tbody>
</table>
How would I be able to get the last cell <td>12345</td> to split into two columns?
There are 2 choices so far.
<table border="1">
<tbody>
<tr>
<td class="td-modal">Name:</td>
<td colspan=2>Randon name</td>
</tr>
<tr>
<td class="td-modal">Project Name:</td>
<td colspan=2>XYZ</td>
</tr>
<tr>
<td class="td-modal">Proj #:</td>
<td>12345</td>
<td>67890</td>
</tr>
</tbody>
</table>
<table border="1">
<tbody>
<tr>
<td class="td-modal">Name:</td>
<td>Randon name</td>
</tr>
<tr>
<td class="td-modal">Project Name:</td>
<td>XYZ</td>
</tr>
<tr>
<td class="td-modal">Proj #:</td>
<td>
<table><tr><td>12345</td>
<td>67890</td></tr></table>
</td>
</tr>
</tbody>
</table>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With