473,394 Members | 1,734 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,394 software developers and data experts.

extra vertical space WITHIN form

There are about a million posts on how to get rid of the extra space _after_ the
form end-tag, but I can't find any that solve my problem: extra space _in_ the
form tag.

I have a table nestled inside the form and since I want the submit button
underneath the input text field i have a br tag to separate them. For some
reason IE5.5 gives me what seems like two br tags. It looks good in Opera 7,
and in K-Meleon 0.6 (Gecko).
Jul 20 '05 #1
4 7405
mappo wrote:
There are about a million posts on how to get rid of the extra space _after_ the
form end-tag, but I can't find any that solve my problem: extra space _in_ the
form tag.
using css, by setting padding and margin.
I have a table nestled inside the form and since I want the submit button
underneath the input text field i have a br tag to separate them. For some
reason IE5.5 gives me what seems like two br tags. It looks good in Opera 7,
and in K-Meleon 0.6 (Gecko).


url?

--
Brian
follow the directions in my address to email me

Jul 20 '05 #2
> using css, by setting padding and margin.
I set margin bottom to 0, but that only helped between the form and the rest
of the page, not insode the form
url?

http://www.ing.umu.se/~id01mht/
Jul 20 '05 #3
You didn't quote much, so others might find this message a bit arcane.
Let's see if I can stick in some context:

url: http://www.ing.umu.se/~id01mht/

mappo wrote:
There are about a million posts on how to get rid of the extra
space _after_ the form end-tag, but I can't find any that solve my
problem: extra space _in_ the form tag.
using css, by setting padding and margin.


I set margin bottom to 0, but that only helped between the form and
the rest of the page, not insode the form


You can also set margins on input, textarea, etc.
I have a table nestled inside the form
No, you have forms nestled inside table cells.
and since I want the submit button underneath the input text
field i have a br tag to separate them.
You don't need the br element. Use display: block for input element.
Set margin: auto to center block level items. Since MSIE/Win
doesn't get this, also set text-align: center for from element.
For some reason IE5.5 gives me what seems like two br tags.


Sounds like a bug in IE 5.5.

I looked at your code. That's not tabular data. Don't use tables for
layout. And KISS (keep it simple, stupid).

/* css */

form {
text-align: center ; /* hack so MSIE centers */
float: left ;
width: 12em ;
}
input {
display: block ;
margin: auto ;
}

<!-- html -->
<form action="http://www.google.com/search" method="get" target="_blank">
<input type="Text" name="q" size="27" maxlength="255" value="">
<input type="submit" name="btnG" value="Google">
</form>
<form name="imdb" method=post action="http://www.imdb.com/Find"
target="_blank">
<input type=hidden name=select value="All">
<input type=text name="for" size="27">
<input type="submit" value="IMDb">
</form>
<form name="biblan"
action="http://katalog.bibliotek.umea.se/opac/sv/opac/main.asp"
method="get" id="sok_fritext" target="_blank">
<input type="text" name="TextFritext" size="27" maxlength="100"
value="">
<input type="submit" value="Ume&aring; St.bibl." id=submit1
name=submit1>
</form>
<!-- etc. -->
wfm, MSIE 5.0/Win. Also works in O7 and Moz 1.3. That's all you
need. You don't need the br element. And you don't need a table to
lay out the forms. And the code is much simpler. In fact, if it
weren't for the line wrapping, it'd be even prettier. :-)

BTW, lose the target="_blank" nonsense. Your users can figure out how
to open a new window if they want.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #4
mappo wrote:

I set margin bottom to 0, but that only helped between the form and the rest
of the page, not insode the form
url?


http://www.ing.umu.se/~id01mht/


I just noticed that you didn't quote all of your attributes in the
form. You should. Note that I copied your form code from your page,
but didn't correct this (I didn't see it before posting my reply). If
you copy my code into your document, don't forget to fix this.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #5

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

Similar topics

12
by: skeeterbug | last post by:
http://www.geocities.com/operationsengineer1/test2.htm the extra space between the logoHeader and the menu bar occurs when i add the <ul>. if i comment out the ul and and all the li, the 1em...
16
by: Uncle Pirate | last post by:
This has me stumped. I am trying to use as little space as possible at the top of my document but Firefox/Mozilla insists on placing vertical space before any element. IE displays it correctly...
0
by: Old Wolf | last post by:
I have a site that I laid out with tables, and lots of grotty hacks and lots of markup generated by client-side javascript. I'm in the process of converting it to "nice" CSS code but have got...
0
by: michael | last post by:
On my ASP.NET pages, it seems that _after_ any web or user control - an extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up...
3
by: michael | last post by:
On my ASP.NET pages, it seems that _after_ any web or user control - an extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up...
2
by: michael | last post by:
On my ASP.NET pages, it seems that _after_ any web or user control - an extra (small) line break or space is inserted automatically right after the Control. This is unwanted since it messes up...
7
by: Bosconian | last post by:
I know that str.replace(/^\s+|\s+$/g,''); will trim a string of space, but what about removing extra spaces from the middle? Where "hello world"
8
by: Stanley | last post by:
The following HTML works as expected in IE6 and IE7, but in Firefox, there is extra space below the image. I tried setting margin and padding to 0 for different elements but still cannot get rid of...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...

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.