|
Posted by Ben C on January 31, 2008, 5:48 pm
Please log in for more thread options
> hi,
> i have a table with rows, 2 columsn in a row. I need to hide and show
> certain cells at a time, i'm able to do this via javascript, setting
> each cell i want hidden with:
> TableCellArray[i].style.display = "none";
>
> where TableCellArray is the array of cells i have in my table. All
> that works fine, but I keep getting spacing issues, it looksl like the
> cell after it's set to none still occupies space, anyway to get rid of
> that extra space?
It shouldn't do. Making the cell display: none should have just the same
effect as deleting the <td> from the document.
But tables are still square, so if you have two cells in a column and
you delete one you will see a gap.
> Each cell contains a div, i've also set that div to
> style.display = "none";
Not necessary. Display: none already causes the descendents not to be
displayed either.
> but still no good. any ideas?
You need to post a URL because it is a bit difficult to know exactly
what you're talking about or what effect you want. You also need to
explain whether you only get this problem in IE.
|