473,503 Members | 1,655 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting a form field to fill a table cell

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 Excel
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 more
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."
Jul 21 '05 #1
2 4172
Marian Aldenhövel <ma****@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
Jul 21 '05 #2
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."
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4276
by: Eric | last post by:
Hey Everyone.. I have a form that has approximately 7 text fields and 1 checkbox. Generally when this form is submitted(to itself BTW) it works fine, however, when the checkbox is only field...
6
5005
by: tm | last post by:
I am trying to reference a table entry (qtyonhand) populated from a recordset. There is only one record displayed on this table. When i try to compare this displayed field to an input field...
8
3059
by: news | last post by:
I seriously doubt this is possible...but you never know, so here goes. Due to bad pre-planning I have a Web page that is VERY table heavy with a very complicated and delicate setup. Any changes...
5
5883
by: Codeman II | last post by:
Hi there, I am building a form where the user must upload a picture and fill in his details. Now I have a problem as all of this is on the same form. How will I be able to have the Browse...
7
6972
by: h7qvnk7q001 | last post by:
I'm trying to implement a simple server-side form validation (No Javascript). If the user submits a form with errors, I want to redisplay the same form with the errors highlighted. Once the form...
1
10467
by: CoolFactor | last post by:
MY CODE IS NEAR THE BOTTOM I want to export this Access query into Excel using a command button on an Access form in the following way I describe below. Below you will find the simple query I am...
2
3548
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
2
3394
dlite922
by: dlite922 | last post by:
Before traversing my code, here's what my goal is and what this function does: I have a table of fields that dynamically grows as the user enters information. A minimum of 3 rows must always...
1
2611
by: jeddiki | last post by:
Hello, I have made a nice opt-in form and tested it in Moz FF and it looks fine. But in IE the elements don't line up properly. I think I am nearly there but can not get these elements...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7280
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7330
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6991
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7460
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5014
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.