tags:

views:

767

answers:

3

I neeed jQuery help.

He can we dynamically resize a table cell ?.If we resize it, change only affect that particular cell,rest should remain same.

+4  A: 

Think about tables for a moment. The vertical columns all align as do the rows. This is what makes it a table. Some browsers might allow you hack around with the size individual table cells, but I wouldn't really recommend it as the out come may well be unpredictable.

The way I would approach this would be to have another element inside the cell but surrounding your content. Then you can resize that other element.

edeverett
A: 

You might need to calculate the size of the remaining TDs according to the new size, then change the width of all the TD simultaneously.

Makram Saleh
+2  A: 

If you resize one cell in a column, or row, the row and column will then, by necessity and design, resize to accommodate that cell. As noted by edeverett, that's part of what makes it a table.

One way to do it might involve changing the rowspan="" and colspan="" values, but if you do that you'll also have to manipulate other cells, to remove/hide them from the document otherwise you could end up with too many cells, causing weird rendering issues.

I really would avoid this. If you're trying to add distinction to the cell contents, use colour. Font size and changing size is more likely to mess up the display and UI than be a help to anyone.

David Thomas