Getting Rid Of Default Form Tag Space
When a <form...> tag is used on a web page, it inserts a line break and a blank line by default. Both of those can be disabled with CSS.
The style display:inline; removes the line break. The style margin:0; removes the blank line.
This is an example.If the form is put within tags that default with their own line breaks and/or margins, like the p paragraph tag, its attributes may have an effect on the form tag.
Here is the code for the above example.
This <form style="margin:0; display:inline;"> <input type="submit" value="Submit Button" onclick="alert('example');return false;"> </form> is an example.
The styles display:inline; and margin:0; can be used individually or together in one style definition.
Will Bontrager