Page 1 of 1

td height

Posted: Thu Jul 23, 2009 1:06 am
by m2babaey
Hi
I have a table and in its first column I need to use a form (some hidden fields and a button) but when I place the <form> tag in the td, then <td> height is increased and makes it look bad
I uploaded it here. a simple html page: http://khojasteh.org/table.html
How can I fix it
Any help would be appreciated

Re: td height

Posted: Thu Jul 23, 2009 7:59 am
by m2babaey
I put the code and snapshot here so you can check it easier:
Image

Code: Select all

<table width="735" align="center" bgcolor="#ffffff" border="1" cellpadding="4" cellspacing="2"> <tbody><tr><td align="center">ordinary height</td><td><font size="-2">(0 Reviews)</font></td><td><font size="-2">Action Video Productions</font></td><td><font size="-2">La Mesa</font></td><td><font size="-2">619-588-8588</font></td><td><font size="-2"><a href="http://www.4avideo.com/" class="gray">Website</a></font></td><td align="center">&nbsp;&nbsp;</td><td>&nbsp;&nbsp;</td></tr>  <tr><td align="center" height="1"><div id="txtHint11"><form style="height:inherit"><input name="vname" id="vname" value="info@studiomio.com" type="hidden"><input name="myname" id="myname" value="email@wemail.com" type="hidden"><input name="txthintid" id="txthintid" value="11" type="hidden"><input value="Save" onClick="saveinfo(vname.value,myname.value,txthintid.value)" type="button"></form></div></td><td><font size="-2">(0 Reviews)</font></td><td><font size="-2">Studio Mio</font></td><td><font size="-2">Covina</font></td><td><font size="-2">626-915-5534</font></td><td><font size="-2"><a href="http://www.studiomio.com/" class="gray">Website</a></font></td><td align="center">&nbsp;&nbsp;</td><td>&nbsp;&nbsp;</td></tr>   <tr><td height="34" align="center"><div id="txtHint11"><form><input name="vname" id="vname" value="info@studiomio.com" type="hidden"><input name="myname" id="myname" value="email@wemail.com" type="hidden"><input name="txthintid" id="txthintid" value="11" type="hidden"><input value="Save" onClick="saveinfo(vname.value,myname.value,txthintid.value)" type="button"></form></div></td><td><font size="-2">(0 Reviews)</font></td><td><font size="-2">Studio Mio</font></td><td><font size="-2">Covina</font></td><td><font size="-2">626-915-5534</font></td><td><font size="-2"><a href="http://www.studiomio.com/" class="gray">Website</a></font></td><td align="center">&nbsp;&nbsp;</td><td>&nbsp;&nbsp;</td></tr> <tr><td height="20" align="center" ><div id="txtHint16"><form>      <input name="vname2" id="vname2" value="jack@4avideo.com" type="hidden">    <input name="myname2" id="myname2" value="email@wemail.com" type="hidden">    <input name="txthintid2" id="txthintid2" value="16" type="hidden">    <input value="Save" onClick="saveinfo(vname.value,myname.value,txthintid.value)" type="button"></form></div></td><td><font size="-2">(0 Reviews)</font></td><td><font size="-2">Action Video Productions</font></td><td><font size="-2">La Mesa</font></td><td><font size="-2">619-588-8588</font></td><td><font size="-2"><a href="http://www.4avideo.com/" class="gray">Website</a></font></td><td align="center">&nbsp;&nbsp;</td><td>&nbsp;&nbsp;</td></tr></tbody></table>

Re: td height

Posted: Thu Jul 23, 2009 8:14 am
by jayshields
Add this to your stylesheets:

Code: Select all

form, input {
  padding: 0;
  margin: 0;
}

Re: td height

Posted: Thu Jul 23, 2009 8:30 am
by m2babaey
Thanks jayshields :P