Thanks for your idea. You could take several approaches to this
problem, such as the one that Yep offered. I haven't seen any
that are 100% satisfactory, but probably some can be refined. I'd
like to be able to use the built in positioning that contentEditable
offers (since it's built in - less javascript overhead), but I've only
gotten it to work nicely for the entire table resizing. Furthermore,
Yep's approach is more widely applicable.
I offer my approach with contentEditable (only works with IE 5.5+)
below, but it's not a clean solution. If you've got an example with
your dynamic SPAN redefinitions, it would be great to see it.
Regards from New York,
Csaba Gabor
<html>
<head>
<title>contentEditable / table resizing tests</title>
<script type="text/javascript">
function prep() {
document.execCommand("2D-position",false,true);
for (var span in document.getElementsByTagName("SPAN"))
span.contentEditable = true;
}
</script>
</head>
<body style="margin:5%" onLoad="prep()">
This is supposed to show how various settings affect the
alterability of table columns and rows. None of
them is satisfactory.<br>Note that frob and Hello World
have to have contentEditable explicitly declared
in the element definition to have the 2D-Position enabled.
<br>Also, note that if the <td> elements are enclosed in
<div>s instead of <span>s that there would be an
an extra space below each unless height was set to 100%
(which would disable row resizing).<br>
<div contentEditable style="border:dashed 2px gold">
<table border=1>
<tr>
<td><span style="background-color:red;height:100%">foo</span></td>
</tr><tr>
<td><span style="background-color:orange;width:100%">bar</span></td>
</tr><tr>
<td><span style="background-color:yellow;height:100%;width:100%">baz</span></td>
</tr><tr>
<td><span style="background-color:green">frob</span></td>
</tr>
<tr>
<td style="height:2.46em"><span style="background-color:blue;height:100%">Hi Mom</span></td>
</tr><tr>
<td style="height:2.46em"><span style="background-color:indigo;width:100%">Hi Dad</span></td>
</tr><tr>
<td style="height:2.46em"><span style="background-color:violet;height:100%;width:100%">Hi Bro</span></td>
</tr><tr>
<td style="height:2.46em"><span style="background-color:silver">Hello World</span></td>
</tr>
</table></div></body></html>
"asdf asdf" <b0*****@yahoo.com> wrote in message news:6f**************************@posting.google.c om...
I've had difficulty with dynamically sizing tables.
Have you considered making your cells spans with various classes?
Then you can dynamically alter the class definitions to achieve
dynamic resizing.