try this:
----------------------------
<script type="text/javascript">
function collapse()
{
var id1 = document.getElementById('td1');
var id2 = document.getElementById('td2');
if(id1.style.display == "none")
{
id1.style.display = "";
id2.style.width = "80%";
}
else
{
id1.style.display = "none";
id2.style.width = "100%";
}
}
</script>
--------------------------------------------------------------------------------------------
<table style="border: solid 1px #b0c4de; width: 100%; height: 500px;">
<tr>
<td id="td1" style="border: solid 1px #b0c4de; width: 20%;">
Menu
</td>
<td id="td2" style="border: solid 1px #b0c4de; width: auto">
Data <span>><hr style="width: 100%;" />
<</span>
</td>
</tr>
</table>
</div>
<a id="img" href="javascript:void(0);" onclick="javascript:collapse();">Collapse</a>
-------------------------------------------------------------------------------------------
try to fit your requirement in this
** Mark any post that really helps you as “ANSWER” to indicate all other viewers in future for reference; **
Thnks,