I have a HTML like so:
<table>
<tr>
<th>colA heading</th>
<th>colb heading</th>
</tr>
<tr>
<td>colA content</td>
<td>colb content</td>
</tr>
<tr>
<th>colC heading</th>
<th>colD heading</th>
</tr>
<tr>
<td>colC content</td>
<td>colC content</td>
</tr>
</table>
That products the following output:
colA heading colB heading
colA content colB content
colC heading colD heading
colC content colD content
what I want to do is detect using presumably JavaScript, if the page is wide enough, dynamically change my table look like so:
colA heading colB heading colC heading colD heading
colA content colB content colC content colD content
How can I do that using HTML (and JavaScript/CSS if need be)?
Thanks