Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing space between multiple forms

Status
Not open for further replies.

chrismassey

Programmer
Aug 24, 2007
264
GB
Hello,

I am trying to write a set of Perl programmes, which are targets of a set of corresponding HTML forms containing just a submit button. Because I am using 11 separate forms to create 11 submit buttons to link to each of the Perl programmes, I am having problems with creating vertical space between each submit button. By default, HTML puts a 1 space gap between each of the forms which are laid beaneath each other, and I want to remove this. I have tried putting each form in a table, but a 1 space gap is still produced at the bottom of each of the 11 cells. Does anyone know how I can remove the space, so each submit button is directly beaneath each other (almost touching).

Thanks, Chris
 
The space at the bottom is generated by the bottom margin that the form has. If you use css to nullify that margin, there will be no gap. So, adding [tt]margin-bottom: 0;[/tt] to your form declaration would work. However, if you wanted to put all the buttons in one line, you might want to change the form from a block to an inline element (in this case the margin is ignored) and simply do [tt]display: inline;[/tt].

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Thanks, although i'm not using CSS. But ill give it a go. :)
 
Whether you're using CSS or not is beyond the point. The display of html elements is controlled via CSS and if you want to change the display of the form, you need to use CSS. If you've been using it to style the form before or not.

___________________________________________________________
[small]Do something about world cancer today: PACT[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top