HTML: When i hide a textbox in a Table, is it expected that the table reformats the space?

Posted by Michel on Stack Overflow See other posts from Stack Overflow or by Michel
Published on 2010-04-28T07:58:39Z Indexed on 2010/04/28 9:33 UTC
Read the original article Hit count: 229

Filed under:
|
|

Hi,

i have a input type=text in a table (in a TD actually) When a user clicks a checkbox, the input is hidden with Jquery (via the hide method) This makes the style of the input to "display:none;"

So far so good. Now, when that has happened, the row where the cell is in is shrunk (the height is lowered) because the only thing left in the row is a <span>, which height is lower than the input height. The net result of this is that the row gets smaller, and when you click the checkbox again the input re-appers and the row gets larger.

That doesn't look so nice, so i wondered if there was a way to prevent this?

And second: is this the way it should work (the table resizing)?

© Stack Overflow or respective owner

Related posts about html

Related posts about jQuery