473,715 Members | 5,945 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 7424
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
9258
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
1281
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
2924
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
16473
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
8821
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
9340
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
9196
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
9047
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...
0
7973
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...
1
6646
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
4477
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...
1
3175
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
2
2539
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.