Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

textboxes in HTML table: How to auto-size?

I want to add a row at the bottom of my HTML table (or at the top, whatever) with a textbox in each column (to allow filtering of content of each column).

FWIW, the table is based on the jQuery DataTables plug-in.

The problem is that the textboxes widen the columns. I want each textbox to fill the width of its column without enlarging it. How can I do this?

like image 904
Serge Wautier Avatar asked Feb 03 '10 08:02

Serge Wautier


1 Answers

try <input type="text" style="width:100%"/> to get the width of parent td.

like image 150
ntan Avatar answered Oct 01 '22 17:10

ntan