473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Removing spaces/padding around <input> text fields?

Hello,

I'm trying to put together a form with a very tight table formatting.
However, every time I put an text-type input field in, the browser
pads the area to the right of it with space. I've tried to eliminate
it several ways, but it won't go away.

It looks like it's forcing at least one space (line break?) in after
each field, and then there's some mystery padding on the right that
also refuses to go away. I've put up a demo of the problem at:
http://lenin.net/~daggar/formtest.html

--you can see the problem clearly if you highlight the whole page in
IE6, or a browser that similarly highlights the entirity of form
fields.

Anyone have any suggestions on how to clean the space from around
these form fields?

Thanks,
J. Daggar
Jul 20 '05 #1
5 13079
jd*****@yahoo.com (Jonathan Daggar) wrote:
I'm trying to put together a form with a very tight table
formatting.
Stop trying, right now. You might even "succeed" in it.
Anyone have any suggestions on how to clean the space from around
these form fields?


We could tell you about the White Space Bug, but then we would have to
give you a long lesson explaining what you are doing wrong.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 20 '05 #2

"Jonathan Daggar" <jd*****@yahoo.com> wrote in message
news:62**************************@posting.google.c om...
Hello,

I'm trying to put together a form with a very tight table formatting.
However, every time I put an text-type input field in, the browser
pads the area to the right of it with space. I've tried to eliminate
it several ways, but it won't go away.

It looks like it's forcing at least one space (line break?) in after
each field, and then there's some mystery padding on the right that
also refuses to go away.
Except for a line break immediately after a start tag or immediately before
an end tag, browsers are supposed to replace each sequence of white-space
characters (space, tab, carriage return, line feed) with a single space. The
actual implementation of this rule by browsers varies somewhat. Replace

<input type="text" class="smallbox" maxlength="3" name="reputation">
</td>

with

<input type="text" class="smallbox" maxlength="3" name="reputation"></td>

and see what happens.

I don't know what distinction you're making between "at least one space in
after each field" and "some mystery padding on the right". It's not clear
from your description or your sample page.
I've put up a demo of the problem at:
http://lenin.net/~daggar/formtest.html

--you can see the problem clearly if you highlight the whole page in
IE6, or a browser that similarly highlights the entirity of form
fields.


Jul 20 '05 #3
"Harlan Messinger" <h.*********@comcast.net> wrote:
The actual implementation of this rule by browsers varies somewhat. Replace
<input type="text" class="smallbox" maxlength="3" name="reputation">
</td>
with
<input type="text" class="smallbox" maxlength="3" name="reputation"></td>
and see what happens.
Thank you, that's half the problem there. That's fixed.
I don't know what distinction you're making between "at least one space in
after each field" and "some mystery padding on the right". It's not clear
from your description or your sample page.


Apologies for that, I've put up a revised copy with the page breaks
removed and borders added to clarify the issue.
http://lenin.net/~daggar/formtest.html

The page break/white space is gone, but there's still a noticeable bit
of trailing space. I call it "mystery padding" because it's
apparently not textual white space (it can't be selected like a text
space could). Something, however seems to be forcing the table cell to
grow in horizontal size, even when the input form proper should be
able to fit within the dictated horizontal size of the cell.

I'm testing this on IE6, Opera 7.2, and Mozilla 1.0. While the
vertical size varies between them-- something I'll have to adjust
for-- all of them seem to be forcing some unexplained white space
between the right edge of the input field and the end of the table
cell. Doubly mysterious (to me at least), since I've set the table
cell to "overflow:hidden" to try to hide the extra space.

What am I missing here?

Thank you again,
J. Daggar
Jul 20 '05 #4

"Jonathan Daggar" <jd*****@yahoo.com> wrote in message
news:62**************************@posting.google.c om...
"Harlan Messinger" <h.*********@comcast.net> wrote:
The actual implementation of this rule by browsers varies somewhat. Replace <input type="text" class="smallbox" maxlength="3" name="reputation">
</td>
with
<input type="text" class="smallbox" maxlength="3" name="reputation"></td> and see what happens.
Thank you, that's half the problem there. That's fixed.
I don't know what distinction you're making between "at least one space in after each field" and "some mystery padding on the right". It's not clear from your description or your sample page.


Apologies for that, I've put up a revised copy with the page breaks
removed and borders added to clarify the issue.
http://lenin.net/~daggar/formtest.html

The page break/white space is gone, but there's still a noticeable bit
of trailing space. I call it "mystery padding" because it's
apparently not textual white space (it can't be selected like a text
space could). Something, however seems to be forcing the table cell to
grow in horizontal size, even when the input form proper should be
able to fit within the dictated horizontal size of the cell.


The rest of your problem is that the sum of the cell widths exceeds the
table's width. When that happens, everything breaks.

Since you're using CSS, use it for the widths as well, and then make sure
everything adds up. You're better off if, to the extent possible, you let
the browser do the work, or you limit explicit widths to only certain
columns.

I'm testing this on IE6, Opera 7.2, and Mozilla 1.0. While the
vertical size varies between them-- something I'll have to adjust
for-- all of them seem to be forcing some unexplained white space
between the right edge of the input field and the end of the table
cell. Doubly mysterious (to me at least), since I've set the table
cell to "overflow:hidden" to try to hide the extra space.

What am I missing here?

Thank you again,
J. Daggar


Jul 20 '05 #5
You're right, of course. I have to finally learn to suppress my
Netscape 3 instincts.

Thanks again for the help.

"Harlan Messinger" <h.*********@comcast.net> wrote in message news:<c2*************@ID-114100.news.uni-berlin.de>...
"Jonathan Daggar" <jd*****@yahoo.com> wrote in message
news:62**************************@posting.google.c om...
"Harlan Messinger" <h.*********@comcast.net> wrote:
The actual implementation of this rule by browsers varies somewhat. Replace <input type="text" class="smallbox" maxlength="3" name="reputation">
</td>
with
<input type="text" class="smallbox" maxlength="3" name="reputation"></td> and see what happens.


Thank you, that's half the problem there. That's fixed.
I don't know what distinction you're making between "at least one space in after each field" and "some mystery padding on the right". It's not clear from your description or your sample page.


Apologies for that, I've put up a revised copy with the page breaks
removed and borders added to clarify the issue.
http://lenin.net/~daggar/formtest.html

The page break/white space is gone, but there's still a noticeable bit
of trailing space. I call it "mystery padding" because it's
apparently not textual white space (it can't be selected like a text
space could). Something, however seems to be forcing the table cell to
grow in horizontal size, even when the input form proper should be
able to fit within the dictated horizontal size of the cell.


The rest of your problem is that the sum of the cell widths exceeds the
table's width. When that happens, everything breaks.

Since you're using CSS, use it for the widths as well, and then make sure
everything adds up. You're better off if, to the extent possible, you let
the browser do the work, or you limit explicit widths to only certain
columns.

I'm testing this on IE6, Opera 7.2, and Mozilla 1.0. While the
vertical size varies between them-- something I'll have to adjust
for-- all of them seem to be forcing some unexplained white space
between the right edge of the input field and the end of the table
cell. Doubly mysterious (to me at least), since I've set the table
cell to "overflow:hidden" to try to hide the extra space.

What am I missing here?

Thank you again,
J. Daggar

Jul 20 '05 #6

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

Similar topics

2
by: not 2 swift | last post by:
I thought I would update an old page on which I had used a <INPUT TYPE=image ...> with a <BUTTON><IMG SRC=...></BUTTON> The problem is that <BUTTON> always provides a shadow/emboss effect. Can...
3
by: iinet | last post by:
How can i set in my css a min width for input elements, but leave the max size dynamic? Ben
3
by: TR | last post by:
Is it possible with CSS to prevent this wrapping alignment with a checkbox with a nested label? This is the label of the checkbox that wraps beneath it I'd prefer it looked like...
0
by: Dave Holmes | last post by:
I am dealing with several pages which have a form with a large number of <input> fields (hundreds). I am finding that there is a long lag time before the browser closes this page and begins...
0
by: Dave Holmes | last post by:
I am dealing with several pages which have a form with a large number of <input> fields (hundreds). I am finding that there is a long lag time before the browser closes this page and begins...
5
by: Bart van Deenen | last post by:
Hi all I have a form with a couple of input fields, embedded within spans. I am using script.aculo.us for dragging and dropping, and want to reorder the input fields that way. The input fields are...
4
by: Steve Swift | last post by:
If it is possible, could someone demonstrate how to make the text entered into an <INPUT TYPE=TEXTfield right-align within the entry field, please? The fields in my form are for numbers, and...
2
by: jp2code | last post by:
I have several input fields on my form, and the form works; however, Visual Studio is showing errors, and I would like to get rid of them. When the form is submitted, it is redirected back to...
1
by: test9991014 | last post by:
Hi folks, I've got something like this: <table> <tr> <td>1</td> <td align=center> <input type=text> </td>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
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...
0
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
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,...

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.