Vertically centering a form in a table

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to put a google search form into a table but I cannot get
it to align vertically.  There is a space below the form that I can't
find the source of.  This code below is for a table with 'rounded
corners'.  The form starts immediately after the top corners but there
is a space below it before the bottom corners start.  Anyone have any
ideas as to why this is?

<table align="center" border="0" cellpadding="0" cellspacing="0"

<td valign="top"><img src="tl.gif"></td>
<td valign="top"><img src="tr.gif"></td>


<FORM method=GET action="">
<input type=hidden name=ie value=UTF-8>
<input type=hidden name=oe value=UTF-8>
<A HREF=""></a>
<INPUT TYPE=text name=q size=25 value="">


<td valign="bottom"><img src="bl.gif"></td>
<td valign="bottom"><img src="br.gif"></td>


Re: Vertically centering a form in a table schrieb:
Quoted text here. Click to load it

Perhaps the form has got some margin or padding by default? Try to get
rid of it using CSS:

<style type="text/css">
form, input {margin:0px; padding:0px;}

But I'm not sure about form/form elements having a padding/margin or not...

BTW: Your form misses any "submit"-button...

Site Timeline