faqts : Computers : Programming : Languages : JavaScript : Forms

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

47 of 51 people (92%) answered Yes
Recently 9 of 10 people (90%) answered Yes

Entry

How do I avoid the line breaks before and after a FORM element?

Feb 15th, 2002 20:53
Scott, Martin Honnen,


By default a FORM is a so called block element (like a DIV) being a 
box 
with top and bottom margin.
You should be able to change the display attribute of an HTML element 
to inline using
  <FORM STYLE="display: inline;" ...>
though only IE4+ seems to correctly interpret this.

Try this

<HTML>
<HEAD>
<style type="text/css">
<!--
form {  margin-top: 0px; margin-bottom: 0px}
-->
</style>
</HEAD>