How can I make a <textarea>
occupy all available space within a <td>
element?
Upon clicking inside the table cell, the <textarea>
should display with precisely the same dimensions as the cell itself, resembling an Excel spreadsheet.
I have attempted to set the width and height of the <textarea>
to 100%, but this approach proved unsuccessful. Instead, the dimensions became distorted, causing the table cells to shift slightly due to incorrect resizing in both vertical and horizontal aspects.
Is there a way to achieve this desired functionality?
edit:
You can view the failed attempt here: http://jsfiddle.net/4QbMr/6/
(both cells should be the same size)