This question is related to this question I asked a little while back. The updated code is posted here. This to note is that i am looking to create a HTML table dynamically that looks similar to this:
<table>
<tbody>
<tr>
<td colspan="3" align="right">Header</td>
</tr>
<tr>
<td colspan="3" align="right">Header</td>
</tr>
<tr>
<td colspan="3" align="right">Header</td>
</tr>
<tr>
<td>Col1</td>
<td>Col3</td>
<td>Col4</td>
</tr>
<tr>
<td>Col1</td>
<td>Col3</td>
<td>Col4</td>
</tr>
</tbody>
</table>
I can get this done in markup but when I do it in js the colspan does not seem to work in IE7. Any hep will be greatly appreciated.
The colspan attribute just specifies how many columns (hence, how many slots in the grid for the table) a cell occupies. If you see the last cell of row 2 as the widest, then the reason is probably that it has most contents (or there is a width setting for it). Your demo code does not demonstrate such behavior.
Attribute Values: It contains a value i.e number Which specify the number of columns that a cell should span. Note: colspan=”0″ tells the browser to span the cell to the last column of the column group (colgroup).
The colspan attribute defines the number of columns a table cell should span.
http://www.w3schools.com/jsref/prop_tabledata_colspan.asp
The colSpan
javascript property has a capital S
.
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