Hiding and collapsing part of a table with TBODY

J

jc

I have a tbody tag in the middle of table like this.

</tr>
<tbody id="tbodytest" >
<tr>

I can hide that part of the table with this code:

document.getElementById('tbodytest').style.visibility = 'hidden';

But it lease a big gap in my table that I'd like to collapse away..
not just hide.

I see a visibility property called collapse, but it does not seem to
work in IE7

What are my options?

Thanks for any help or information.
 
E

Evertjan.

jc wrote on 30 jun 2009 in comp.lang.javascript:
I have a tbody tag in the middle of table like this.

</tr>
<tbody id="tbodytest" >
<tr>

I can hide that part of the table with this code:

document.getElementById('tbodytest').style.visibility = 'hidden';

But it lease a big gap in my table that I'd like to collapse away..
not just hide.

I see a visibility property called collapse, but it does not seem to
work in IE7

Read up on CSS!!

visibility:hidden; keeps the placeholder

display:none; collapses.

This is OT on this NG, see a CSS NG.

Always first test simple css style,
and only later use dynamic javascript.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top