PDA

Click to See Complete Forum and Search --> : <FORM> space


DKCK
Feb 28th, 2002, 12:40 PM
Is there any way to get rid of the extra blank space created by the <FORM> tag?

The Hobo
Feb 28th, 2002, 01:21 PM
Sadly, I don't think that there is. If there is, I'd be very happy to know how.

scoutt
Feb 28th, 2002, 02:05 PM
in CSS you can. But it will not work in NS4.xx

http://www.faqts.com/knowledge_base/view.phtml/aid/10786/fid/680

or add this to the from tag

style="display: inline;"

CiberTHuG
Feb 28th, 2002, 03:30 PM
The from tag doesn't take up space. If it truely does in your browser, then it is your browser's fault. Any work around will fix the problem in that browser and run the risk of breaking the page in another.

The Hobo
Feb 28th, 2002, 03:51 PM
Originally posted by CiberTHuG
The from tag doesn't take up space. If it truely does in your browser, then it is your browser's fault. Any work around will fix the problem in that browser and run the risk of breaking the page in another.

Have you ever even used a form? :rolleyes:

CiberTHuG
Feb 28th, 2002, 04:12 PM
Yes, and I've never had it take up space on a page.

Funny how that works.

The Hobo
Feb 28th, 2002, 04:16 PM
Yeah, that is pretty funny. Go here > http://www.mindlessdrone.com/test.shtml

Funny how that leaves a space, huh?

CiberTHuG
Feb 28th, 2002, 04:21 PM
That would be because some idiot left text floating on the page without containers. Perhaps if you put the text in a valid tag (p, div, span, et al)?

The Hobo
Feb 28th, 2002, 04:24 PM
Since when is this the standard? You don't need to cotain text between tags. It's perfectly legal. And if you knew this, why didn't you answer the question so?

And by the way, http://www.mindlessdrone.com/test.shtml try again.

Please stop making me your personal enemy.

CiberTHuG
Feb 28th, 2002, 04:34 PM
Ah, sorry. I see in the 4.01 Transitional recommendations that you can get away with text just floating in the abyss. And that is fine, but if you don't specify the layout, then don't complain about how it turns out.

As to adding div tags, I don't see any space taken up by the form tag.

Again, funny.

The Hobo
Feb 28th, 2002, 04:42 PM
I see a large amount of space. What version of what browser are you using?


And that is fine, but if you don't specify the layout, then don't complain about how it turns out.


This example wasn't using any kind of layout, it was just text. I didn't see the need to add anything special. I use many <div> tags in my site, but sometimes I don't, and I don't have a problem when I don't.

Maybe it's just because I'm remembering the days of HTML before <div> and all that existed. We were happy with the bold tag.

CiberTHuG
Feb 28th, 2002, 04:53 PM
Yes, you see space. The div tags have built in margins. Perhaps if you set them to 0. But if you remove the form tag, you won't suddenly see less space.

As to remembering back in the day, I first learned HTML before it had version numbers. What we loved back then was a lack of frames. Ah... no stupid frame pages. Oh, and CGI was done in Rex more often than Perl, but I never learned Rex.

Ah, Mosaic, now that was a browser. And Lynx. If your page didn't render in Lynx then your page was crap.

The Hobo
Feb 28th, 2002, 04:57 PM
I'm not going to waste time uploading countless html documents just to prove you wrong. Setting the margins to 0 wont do anything either. It's the form tag.

I'm doing this alot lately, but this thread is yours. I'm done with it. Have a good night.

CiberTHuG
Feb 28th, 2002, 05:03 PM
Again, if the form tag takes up space when rendered, the the problem is either, your UA sucks (I'm using Opera, and recommend it if your UA is at fault), or the developer made a mistake.

I don't care if you like me, and I don't care if you agree with me, but you have to respect the truth.

scoutt
Feb 28th, 2002, 06:12 PM
Travis, did you read that link I suggested. the form tag does make a border around it. check this out.

www.snippetlibrary.com/test/tables.html

you can see the tables split? the form tags are before and after the middle table. as you can see I don't have any div tags in there just plain tables and a form tag.

and opera is not the most compliant browser, so it should do just as bad as Netscape.

play around the source ofthat page. make the form tags start in the middle table. what ever you do it will create break above it and below it.

thinktank2
Feb 28th, 2002, 09:31 PM
Is there any way to get rid of the extra blank space created by the <FORM> tag?<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF" text="#000000">
This is a text before the form
<form style="margin:0;" name="form1" method="post" action="">
This is a text inside the form
</form>
</body>
</html>

scoutt
Feb 28th, 2002, 09:49 PM
as usual, it doesn't work in NS4.xx. suppose you don't have one for Netscape there thinktank.......

but that is almost what I proposed in my first post.

thinktank2
Mar 1st, 2002, 04:31 AM
Originally posted by scoutt
as usual, it doesn't work in NS4.xx. suppose you don't have one for Netscape there thinktank.......

but that is almost what I proposed in my first post.

Originally posted by CiberTHuG
Again, if the form tag takes up space when rendered, the the problem is either, your UA sucks (I'm using Opera, and recommend it if your UA is at fault), or the developer made a mistake.

:D

thinktank2
Mar 1st, 2002, 04:53 AM
OK, here is a short piece of code to easily handle all netscape woes..

scoutt
Mar 1st, 2002, 07:18 AM
haha that was funny :D

CiberTHuG
Mar 1st, 2002, 09:37 AM
Scout, yes, the form tag adds a space between the tables (not in the tables) in IE 5.50. I'm not at work or home, so I can't test the page with a real browser (Netscape, Opera, Mozilla, Konqueur).

sail3005
Mar 1st, 2002, 09:54 AM
Originally posted by scoutt
Travis, did you read that link I suggested. the form tag does make a border around it. check this out.

www.snippetlibrary.com/test/tables.html

you can see the tables split? the form tags are before and after the middle table. as you can see I don't have any div tags in there just plain tables and a form tag.

and opera is not the most compliant browser, so it should do just as bad as Netscape.

play around the source ofthat page. make the form tags start in the middle table. what ever you do it will create break above it and below it.

I've been using that trick for a while. Since before the days when css was popular. It is a great trick.

I actually found it by looking at the source for cnet.com :D

scoutt
Mar 1st, 2002, 10:39 AM
Originally posted by CiberTHuG
Scout, yes, the form tag adds a space between the tables (not in the tables) in IE 5.50. I'm not at work or home, so I can't test the page with a real browser (Netscape, Opera, Mozilla, Konqueur).
that is correct. but I think Netscpae and any other browser beside IE will add space in the table. I can't remember and I too am at work and can't test it.

CiberTHuG
Mar 1st, 2002, 11:11 AM
Yesterday, when we were testing with p and div tags, the form tag did not affect the layout in Opera 6.

Netscape 6 has a pecular habit that I don't like. When a block element containing an input element is made invisible, you can still see the outline of the input element in any thing that sits over the invisible block.

IE 5.50 and Opera 6 didn't share that rendering kink.

xuralarux
Mar 1st, 2002, 12:21 PM
Originally posted by CiberTHuG
I'm not at work or home, so I can't test the page with a real browser (Netscape, Opera, Mozilla, Konqueur).
:confused: You're joking, right? Please tell me you're joking... Netscrape sucks, it starts java seperately and is damn slow. How primitive are those other browsers? I'll give the benifit of the doubt and assume they can handle JScript, but I bet they have no clue what CSS is.

pnj
Mar 1st, 2002, 01:15 PM
i'm not trying to start a flame war, just exchanging information and ideas....

what do you do if your users use various browsers? i can't get everyone to download opera. some use IE, netscape, aol, etc....

JoshT
Mar 1st, 2002, 01:34 PM
Originally posted by xuralarux

:confused: You're joking, right? Please tell me you're joking... Netscrape sucks, it starts java seperately and is damn slow. How primitive are those other browsers? I'll give the benifit of the doubt and assume they can handle JScript, but I bet they have no clue what CSS is.

Netscape 6, Mozilla, and I believe Konquerer are all based on the same Gecko rendering engine, which is quite nice. JScript is not javascript - only IE fully supports, and nothing else ever should. New versions of IE do not support Java without a seperate download.

scoutt
Mar 1st, 2002, 01:43 PM
that's the whole idea. all the stuff that fixes this problem will only work in IE.

I here ya on other users have other browsers. that is why I was trying to find a fix for Netscape 4.xx, but doesn't seem to be one.

vcv
Mar 1st, 2002, 01:47 PM
Opera supports javascript and CSS, xural.

Ciber: if you're saying IE isn't a real browser, then I can do nothing but laugh at you.

I write my html to look good in Opera, and 90-95% of the time it will look the same in IE. Netscape6.2 does pretty good too. In cases where opera and IE don't display things the same, Netscape most of the time displays it the same as one of them, and not totally different and screwed up like Netscape used to do.

DKCK
Mar 2nd, 2002, 06:03 AM
Thanks for the many replies. I didn't know the FORM tag was such a controversial topic!

However style="margin:0;" seems to work for my problem. As for it not working in Netscape browsers, what else is new?

CiberTHuG
Mar 19th, 2002, 11:30 AM
Sorry for taking so lon to get back to this thread.

Yes, the form tag adds space between table tags. It wasn't for p or div tags. Odd. I would expect it to be consistent. I would guess that I was doing something wrong when I tested it with p and div, or it really is that much more screwy.

In either case, I would consider this a bug, and submit it to Opera. The form tag is not supposed to take any space in layout. It is also not supposed to accept any block or inline CSS attributes, which means margin: 0 isn't supposed to work.

xuralarux, no, I'm not joking. I consider IE to be a substandard browser. It was written by people who actively seek to undermind the standards, and refuse to work within the system to improve them. Aside from that, it is not terribly portable, does not officially support Java, and supports prioprietary extensions to JavaScript that have the potential to cause conflicts.

And it can not be uninstalled from Windows 2000.

As to "those other" browsers. None of them have any care about JScript, or VBScript for that matter. They all support JavaScript and Java (funny how that works, since Netscape owns JavaScript and are in on the Java project). And they all support CSS. They are also portable across several platforms (and embedded devices). Opera also has a MDI interface, mouse gestures, and is the only browser I've used that supports the @media CSS standard (read: IE doesn't cover as much of the CSS standard as Opera does).

I've not, yet, used a browser that supports the optgroup tag, so I know of no browser that is 100% compliant with the HTML, CSS, DOM, and JavaScript standards.

vcv, laugh all you want. IE has too many extensions to consider it trustworthy. While pages may correctly render, I have lost respect for the browser and the company. Apparently so has the industry, which is why MS was kicked off the Java project, and why IE does not natively support Java.

As to "Netscape used to do". Old versions of Navigator and Communicator are not compliant with modern standards. The irony here is, they were the browsers that introduced the standards. If anyone is still using Navigator or Communicator, they need to upgrade to Netscape 6 or newer.

DKCK, as for "not working in Netscape". Like I said. The form tag isn't supposed to be a block element. It isn't supposed to accept layout attributes such as margin. The fact that it works in some browsers is related to the problem of the form tag taking up space in the first place.

JoshT
Mar 19th, 2002, 12:38 PM
FWIW, W3 has the form tag taking up space in this sample stylesheet. http://www.w3.org/TR/REC-CSS2/sample.html.

CiberTHuG
Mar 19th, 2002, 03:23 PM
What is "FWIW"? "From what I witness"?

That is interesting. I was looking at the HTML doco and got the impression that the form tag was not supposed to be a block element. But... in the CSS doco it is defined as block? Well, in theory, you should be able to define it as inline. That should cut down on some space it takes since it will suddenly have no margins.

JoshT
Mar 20th, 2002, 06:30 AM
For what it's worth.

Yeah, in CSS you should be able to define any tag any way you want, for future compatibility with XML. Anyway, as long as I remember, browsers have tended to put space around a form tag. I usually use CSS to set the margin and padding to 0 and not worry about it.