aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Html Form New line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Html Form New line" Watch "Html Form New line" New topic
Author

Html Form New line

Abubacker Siddik
Ranch Hand

Joined: Aug 12, 2009
Posts: 90
Hi all,

I too often find a problem with html forms. Whenever i place a form element, It creates a new line effect in IE. i.e, It looks like I have invisible div block at the end of form element. But mozilla and opera browers don't render this new line effect. SO my web design looks like screwed up. Is there any way to solve this problem? Is my understanding of html form correct?

Please help me.

Abu.A
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Check your CSS, perhaps; I've never seen that behavior.
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

can you post a link to an example? ...or post the HTML?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61010
    
  65

I too have never seen that behavior.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Abubacker Siddik
Ranch Hand

Joined: Aug 12, 2009
Posts: 90
Its interesting that you people didn't hear up this. Well Maybe I have perceived things differently. I have given the sample code.




This wont show any difference. SO i just put div block around form content.



Mozilla 3.5.3 and opera 9.50 render same page and IE 6.0 renders differently like it has invisible div block. Please help me thing.

Abu.A
Abubacker Siddik
Ranch Hand

Joined: Aug 12, 2009
Posts: 90
Hi, anybody can help me to solve this problem??



Abu.A
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

No one can reproduce your problem. Please post images of your web pages in both firefox and IE so we can see what you are talking about.
Abubacker Siddik
Ranch Hand

Joined: Aug 12, 2009
Posts: 90
Hi all,

I was asking you a solution for a problem which i was suffering very much. But you people kept silence. I am sorry guys I must have described it well so that you can understand. Anyway you don't understand my problem. But at last a simple Google gave me the answer.

Actually, form tag is basically block element and some browsers render a vertical extra space after </form>. mozilla family doesn't do this. IE and other browsers do this by giving an extra new line after form. This is sometimes best understood if the form tag is inside table cell. My web pages always contain tables and so I faced this problem very often.

The problem happens not because it is inside table cell, or <form> tag renders this. This happens because browsers render an extra space after a form tag since form tag is block level element. To avoid this problem, a simple style attribute will do.

<form style="margin-bottom:0px;" method="post" action="#">
</form>

To the detailed discussion, Click here.


Thanks for all,
Abu.A
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Html Form New line