![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a form with one input per line. Each input is preceded with a label of variable character length. I would like my input's width to grow and fill the rest of the available line. I can't see a way of doing this in pure CSS, |
|
the only alternative I see is wrapping each line in a 2-column table, and setting the input width to 100% of the containing cell. |
#3
| |||
| |||
|
|
Gerry Vandermaesen <gerry.vandermaesen (AT) gmail (DOT) com> scripsit: the only alternative I see is wrapping each line in a 2-column table, and setting the input width to 100% of the containing cell. Well, it seems that you already have a solution - you just haven't sold it to yourself yet! |
|
Actually the most difficult part might be setting the width for the _first_ column. You can't just leave it unspecified and the set the entire table's width to 100%, because browsers will treat this in different ways . Perhaps the best shot is to set the first column's width in em units, using some good guess based on the expected maximum length of the labels. |
|
---------------------------------------/----------------------------------| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below | first name lower case at ipal.net / spamtrap-2006-05-30-0349 (AT) ipal (DOT) net | ------------------------------------/-------------------------------------| |
#4
| |||
| |||
|
|
On Tue, 30 May 2006 00:53:13 +0300 Jukka K. Korpela <jkorpela (AT) cs (DOT) tut.fi> wrote: | Gerry Vandermaesen <gerry.vandermaesen (AT) gmail (DOT) com> scripsit: | |> the only alternative I see is wrapping each |> line in a 2-column table, and setting the input width to 100% of the |> containing cell. | | Well, it seems that you already have a solution - you just haven't sold it | to yourself yet! There are people hanging around that will say that tables should not be used (except for tabular data). What he really needs to do is learn to ignore them. |
#5
| |||
| |||
|
|
phil-news-nospam (AT) ipal (DOT) net wrote: On Tue, 30 May 2006 00:53:13 +0300 Jukka K. Korpela <jkorpela (AT) cs (DOT) tut.fi> wrote: | Gerry Vandermaesen <gerry.vandermaesen (AT) gmail (DOT) com> scripsit: | |> the only alternative I see is wrapping each |> line in a 2-column table, and setting the input width to 100% of the |> containing cell. | | Well, it seems that you already have a solution - you just haven't sold it | to yourself yet! There are people hanging around that will say that tables should not be used (except for tabular data). What he really needs to do is learn to ignore them. Well wrapping each line in an individual table didn't look like a very clean solution. But perhaps in this case it's the only valid solution to accomplish my goal? |
|
---------------------------------------/----------------------------------| Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below | first name lower case at ipal.net / spamtrap-2006-06-01-0127 (AT) ipal (DOT) net | ------------------------------------/-------------------------------------| |
![]() |
| Thread Tools | |
| Display Modes | |
| |