473,700 Members | 2,845 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 7421
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.bibliot ek.umea.se/opac/sv/opac/main.asp"
method="get" id="sok_fritext " target="_blank" >
<input type="text" name="TextFrite xt" size="27" maxlength="100"
value="">
<input type="submit" value="Ume&arin g; 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
9405
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 space disappears in firefox. http://www.geocities.com/operationsengineer1/test3.htm it never shows in ie6. if i increase the margin of hmenu to 1 em, there is no effect on the top and bottom, but the right and left are
16
9257
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 (as I want). At one point, I set some negative top margins which moved the graphics above the page in IE. Here's the link: http://abateofnm.org/ I've tried reformatting the HTML to assure there is no white space and I've tried setting top...
0
2257
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 stuck on a couple of issues. My pages are going to be used in a situation with fixed viewport (1024x768) and Mozilla browser -- so there are no resizing / browser issues to worry about. My basic page layout is:
0
1280
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 vertical alignment preventing me of having things "touch" each other. I have tried surrounding the controls in a DIV tag with padding set to 0 but this still does not help. What must I do to prevent this line-break or space to happen after a...
3
3986
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 vertical alignment preventing me of having things "touch" each other. I have tried surrounding the controls in a DIV tag with padding set to 0 but this still does not help. What must I do to prevent this line-break or space to happen after a...
2
2921
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 vertical alignment preventing me of having things "touch" each other. I have tried surrounding the controls in a DIV tag with padding set to 0 but this still does not help. What must I do to prevent this line-break or space to happen after a...
7
16471
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
11691
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 it. Any idea what causes the space? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
0
9206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9066
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...
1
8963
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8916
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6558
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5899
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4400
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
4652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2022
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.