|
Posted by Jonathan N. Little on 12/06/07 15:16
sdf wrote:
> I'm trying to create a table of form input text cells, like this:
>
> <form>
> <table>
> <thead>
> <tr>
> <th>First Column</th>
> <th>Second Column</th>
> </tr>
> </thead>
> <tbody>
> <tr>
> <td><input type="text" name="r1c1" /></td>
> <td><input type="text" name="r1c2" /></td>
> </tr>
> <tr>
> <td><input type="text" name="r2c1" /></td>
> <td><input type="text" name="r2c2" /></td>
> </tr>
> </tbody>
> </table>
> </form>
> </p>
>
> Is there a way the text input window can be defined to fill the cell
> area no matter
> what size the table is? I could define input's size attribute, I
> tihnk, if the table
> were of a set size, but the table size can vary.
Firstly you know the table will only be as wide as it needs to be for
the content, so I will set it here for the demonstration
table { width: 90% }
Now I can make the inputs 100% but they will overtake any cell padding
so I will use 99%
td input { width: 99% }
--
Take care,
Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
Navigation:
[Reply to this message]
|