473,624 Members | 2,439 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 13103
jd*****@yahoo.c om (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.goo gle.com...
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="reputatio n">
</td>

with

<input type="text" class="smallbox " maxlength="3" name="reputatio n"></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.*********@co mcast.net> wrote:
The actual implementation of this rule by browsers varies somewhat. Replace
<input type="text" class="smallbox " maxlength="3" name="reputatio n">
</td>
with
<input type="text" class="smallbox " maxlength="3" name="reputatio n"></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:hidde n" 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.goo gle.com...
"Harlan Messinger" <h.*********@co mcast.net> wrote:
The actual implementation of this rule by browsers varies somewhat. Replace <input type="text" class="smallbox " maxlength="3" name="reputatio n">
</td>
with
<input type="text" class="smallbox " maxlength="3" name="reputatio n"></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:hidde n" 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.*********@co mcast.net> wrote in message news:<c2******* ******@ID-114100.news.uni-berlin.de>...
"Jonathan Daggar" <jd*****@yahoo. com> wrote in message
news:62******** *************** ***@posting.goo gle.com...
"Harlan Messinger" <h.*********@co mcast.net> wrote:
The actual implementation of this rule by browsers varies somewhat. Replace <input type="text" class="smallbox " maxlength="3" name="reputatio n">
</td>
with
<input type="text" class="smallbox " maxlength="3" name="reputatio n"></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:hidde n" 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
5956
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 I get rid of that? If the old <INPUT> button has been deprecated in favor of <BUTTON>, have all it's button functions been duplicated? Thanks for any help,
3
12189
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
13141
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 this, with a flush left margin:
0
1414
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 loading another- even if another link is selected and the form is not submitted. I can understand a long submittal time, but if the page is abandoned, why would it be taking so long? Thanks.
0
1556
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 loading another- even if another link is selected and the form is not submitted. I can understand a long submittal time, but if the page is abandoned, why would it be taking so long? Thanks.
5
2243
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 display:inline because I want them all on the same line. Does anyone know of a smart trick to be able to drag these input fields? Just setting their disabled attribute doesn't work, because then they get no events. Not setting disabled just...
4
54738
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 they look strange aligned left. -- Steve Swift http://www.ringers.org.uk
2
3281
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 itself, where it checks the values that were entered. If the default values are set, this is the visitor's first time to access the page. Example: The FirstName field would initially be displayed with "First Name;"
1
5499
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
8231
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8168
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8614
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
7153
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4075
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4167
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2603
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1780
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1474
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.