Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Html Form New line

 
Abubacker Siddik
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check your CSS, perhaps; I've never seen that behavior.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you post a link to an example? ...or post the HTML?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I too have never seen that behavior.
 
Abubacker Siddik
Ranch Hand
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, anybody can help me to solve this problem??



Abu.A
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 90
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic