Hi,
Short question:
Is it possible to write a CSS-Style that formats <INPUT TYPE=TEXT>-Elements
in Table-Cells in a way that they use all the horizontal space available?
Long question:
I export spreadsheets from Excel to HTML. The resulting HTML is horrible to
look at, but renders OK in Internet Explorer. The basic principle is a huge
table with an embedded stylesheet that formats everything as it were in Exce
l
or as close as possible. Plus lots of extra stuff including custom tags that
I
don't understand and do not want to investigate if I can avoid it.
Now I am to process this HTML so that the HTML declares a Form with
Input-Elements for some of the cells. More precisely I am writing a program
that does this processing based on some rules telling it where to put an
Input.
I would like to be able to add my INPUT-Elements in such a way that they use
the available width of the table-cell they are in. But all I can manage is
absolute widths which according to Murphys law are either too wide and
overflow the cells or too narrow to hold the desired input while there is mo
re
visible space around them.
Parsing the HTML to find the absolute width of the cell each Input is in to
then format it to the same width seems unfeasable.
Can't I just say: "Every INPUT in a TD should be as wide as possible"?
If so, how? Help!
Ciao, MM
--
Marian Aldenhövel, Rosenhain 23, 53123 Bonn. +49 228 624013.
http://www.marian-aldenhoevel.de
"There is a procedure to follow in these cases, and if followed it can
pretty well guarantee a generous measure of success, success here
defined as survival with major extremities remaining attached."
Marian Aldenhövel <marian@mba-software.de> wrote:
>Is it possible to write a CSS-Style that formats <INPUT TYPE=TEXT>-Elements
>in Table-Cells in a way that they use all the horizontal space available?
input{width:100%}
You could have found this yourself in less time than it took you to
compose the message.
--
Spartanicus
Hi,
> input{width:100%}
Thank you very much.
In fact I tried that but it did not seem to help. Now with someone else
telling me that it is supposed to work that way I looked closer and found
out why.
In the case in question what looks like single cell is actually three of
them, formatted with lots of borders and non-borders to look like one.
And the inputfield of course stretches only to the width of the sub-cell
it is in.
That is OK, I can always blame the designer of the spreadsheet :-).
> You could have found this yourself in less time than it took you to
> compose the message.
I have been fiddling all day with this. May be easy if you know where
to look. If you don't it isn't.
Ciao, MM
--
Marian Aldenhövel, Rosenhain 23, 53123 Bonn. +49 228 624013.
http://www.marian-aldenhoevel.de
"There is a procedure to follow in these cases, and if followed it can
pretty well guarantee a generous measure of success, success here
defined as survival with major extremities remaining attached."