> Hello, and congratulations for this beautiful and meticulous forum.
Hello and welcome. :-)
Now to your problem. 'display' property of CSS decides how an element would be displayed. Since you already have a table, it doesn't make sense to set the display property to table.
Normally this property is used to alter the way a paragraph, a div block or a span block i.e. any container tag displays the data. So what to do when the tag under consideration is a 'table' tag? Simple, set its property to nothing.
<table id="tab" border="1" width="100%">
<tr>
<td width="100%">test</td>
</tr>
</table>
and when making it hidden do something like:
<html>
<head>
<script type="text/javascript">
function hide(id)
{
document.getElementById(id).style.display = 'none';
}
function show(id)
{
document.getElementById(id).style.display = '';
}
</script>
</head>
<body onmousedown="hide('tab');" onmouseup="show('tab');">
<table id="tab" border="1" width="100%">
<tr>
<td>test</td>
</tr>
</table>
</body>
</html> ~s.o.s~
Failure as a human
Administrator
11,938 posts since Jun 2006
Reputation Points: 3,281
Solved Threads: 734
