Hey,
This is my first question here so let me know if i have not understood the site ethos ;)
I have written a html page for showing and hiding nested tables. I would like to get the columns to align correctly. I have got close by setting the columns to have a specific width
in both IE and firefox the columns are a few pixels out... - how can i fix this?
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>item List</title>
<script type="text/javascript">
<!--
function toggle_visibility(id) {
var e = document.getElementById(id);
if(e.style.display == '') {
e.style.display = 'block';
}
if(e.style.display == 'block')
e.style.display = 'none';
else
e.style.display = 'block';
}
//-->
</script>
</head>
<body>
<div id="root">
<table border="1" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="200">
<p><a href="#" onclick="toggle_visibility('itemAAA');">itemA</a></p>
</td>
<td width="200">Feild2</td>
<td width="200">Feild3</td>
</tr>
<tr>
<td colspan="3">
<div id="itemAAA">
<table border="1" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="200">
<p><a href="#" onclick="toggle_visibility('itemAA');">itemAA</a></p>
</td>
<td width="200">Feild2</td>
<td width="200">Feild3</td>
</tr>
<tr>
<td colspan="3">
<div id="itemAA">
<table border="1" cellspacing="0" width="100%">
<tbody>
<tr>
<td width="200">
<p>itemAAA</p>
</td>
<td width="200">Feild2</td>
<td width="200">Feild3</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</td>
</tr>
<tr>
<td width="200">
<p>itemB</p>
</td>
<td width="200">Feild2</td>
<td width="200">Feild3</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
any ideas? is there a better option to acheive the same functionality?
David