some space appears!

I have a dynamically generated table which is inside a <div>. I use javascript to change some of the rows from style='block' to style='none' and vice versa.
When I show rows that I have just hidden a small amount of extra space creeps in between the rows.
Let's say I generate a table that has 10 rows - so I have rows[0] to rows[9].
When it first appears on the screen rows 3,4 and 5 are hidden.
The spacing between rows 2 and 6 is correct.
I then show rows 3,4 and 5 - everything looks okay - the spacing between rows 2 and 3 and between 5 and 6 is correct.
I hide rows 3,4, and 5 again - but some extra space now appears between rows 2 and 6.
After a lot of fiddling about I found I could make this go away if I set the cellspacing of the table to 0 - which is a drag because with a cellspacing of 1 I get a nice grid for my table. Anyone any idea what causes this and how I can get over it? Thanks for any help.Leave your cell spacing 0 and use cell borders for your grid.got a link?either <table border="1"> or td {border:1px #000000 solid;}
 
Back
Top