You are here: Re: form input text in table; how to fill table cell space « HTML « IT news, forums, messages
Re: form input text in table; how to fill table cell space

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация