I have a <div> that contains 2 tables. I want to start off with this <div> as hidden...Then when I click on the link it pops-up the two tables. I am having trouble with the border appearance of the tables.
When the border-collapse property is set to "collapse," it shows the borders on the screen even though the table is hidden.
When the border-collapse property is set to "seperate," it doesn't show the borders on the screen when the table is hidden, but it makes the borders look different when I show the table.
I want the appearance of the 1st table when 'hidden' and the 2nd table when 'visible.'
Please try my HTML...
Here it is:
<script language="Javascript">
function shwMenu()
{
document.all.div1.style.visibility = 'visible';
}
</script>
<a href="javascript:shwMenu();">Show Menus</a>
<br><br>
<div id="div1" style="visibility: hidden">
<table id="tmenu1" width="157" border="1" bordercolor="#0000CC" cellspacing="0" style="border-collapse: seperate">
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
<tr><td bgcolor="#DDCCEE">Item 1</td></tr>
<tr><td bgcolor="#DDCCEE">Item 2</td></tr>
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
</table>
<br><br>
<table id="tmenu2" width="157" border="1" bordercolor="#0000CC" cellspacing="0" style="border-collapse: collapse">
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
<tr><td bgcolor="#DDCCEE">Item 1</td></tr>
<tr><td bgcolor="#DDCCEE">Item 2</td></tr>
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
</table>
</div>
When the border-collapse property is set to "collapse," it shows the borders on the screen even though the table is hidden.
When the border-collapse property is set to "seperate," it doesn't show the borders on the screen when the table is hidden, but it makes the borders look different when I show the table.
I want the appearance of the 1st table when 'hidden' and the 2nd table when 'visible.'
Please try my HTML...
Here it is:
<script language="Javascript">
function shwMenu()
{
document.all.div1.style.visibility = 'visible';
}
</script>
<a href="javascript:shwMenu();">Show Menus</a>
<br><br>
<div id="div1" style="visibility: hidden">
<table id="tmenu1" width="157" border="1" bordercolor="#0000CC" cellspacing="0" style="border-collapse: seperate">
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
<tr><td bgcolor="#DDCCEE">Item 1</td></tr>
<tr><td bgcolor="#DDCCEE">Item 2</td></tr>
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
</table>
<br><br>
<table id="tmenu2" width="157" border="1" bordercolor="#0000CC" cellspacing="0" style="border-collapse: collapse">
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
<tr><td bgcolor="#DDCCEE">Item 1</td></tr>
<tr><td bgcolor="#DDCCEE">Item 2</td></tr>
<tr><td bgcolor="#6E1EAC" height="10" ></td></tr>
</table>
</div>