Reputation: 667
I want to add extra td with my delete icon at the end to my tr without its respecting th column.
I want to adjust in such a way that I would not need any jquery and the table tag width is in percentage, so can not add one more th and make it invisible.
Please refer to below html:
<table>
<tr>
<th>
Col1
</th>
<th>
Col 2
</th>
</tr>
<tr>
<td>
1
</td>
<td>
2
</td>
<td>
<!-- this is new column. -->
Delete Link
</td>
</tr>
</table>
p.s. I can not add position absolute css as it would not be possible to include in every screen resolution.
Upvotes: 1
Views: 1885
Reputation: 6044
Did I understand your problem right? colspan="2"
should be helping you.
<table>
<tr>
<th>
Col1
</th>
<th colspan="2">
Col 2
</th>
</tr>
<tr>
<td>
1
</td>
<td>
2
</td>
<td>
<!-- this is new column. -->
Delete Link
</td>
</tr>
Upvotes: 1
Reputation: 13535
I believe table needs to have its geometry to be consistent from top to bottom. The best answer i can give you is to hide the top row header column and make the others visible.
Upvotes: 0