Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to reduce cell heigt in a Table

 
Kishan Kumar
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Iam attaching a html code below which displays three rows i.e.
First Name, Last Name and Email Address and each having a corresponding textbox for user to enter. On putting the table border as 1 I see that all the space inside the first row is occupied. But the second and third row there is space around the cells. I do not want this extra space inside the cell. I could not determine what is contributing to the height of the cell and why is that only the first row has no space around it while the second and third row has.
<HTML>
<HEAD>
<link rel="stylesheet" href="bcs_styles.css" type="text/css">
</HEAD>
<BODY>
<FORM name="f1" method="post" value="">
<TABLE border="1" cellspacing="0" cellpadding="0">
<TR> <!-- First Name -->
<TD width="39%" align="right" class="boldlabels">First Name :</TD>
<TD width="1%"> </TD>
<TD width="60%" align="right">
<INPUT type="text" value="Kishan Kumar" name="first_name_in"
size="35" class="normal" maxlength="40"></TD>
</TR>

<TR> <!-- Last Name -->
<TD width="39%" height="39" align="right" class="boldlabels">Last Name :</TD>
<TD width="1%" > </TD>
<TD width="60%" height="39" align="right">
<INPUT type="password" value="Vemuru" NAME="last_name_in"
size="35" class="normal" maxlength="40"></TD>
</TR>


<TR> <!-- Email Address -->
<TD width="39%" height="39" align="right" class="boldlabels">
E-mail address :</TD>
<TD width="1%" > </TD>
<TD width="60%" height="39" align="right">
<INPUT type="text" value="kishan_kumar_v@yahoo.com" NAME="email_address_in"
size="35" class="normal" maxlength="40"></TD>
</TR>
</TABLE>
</BODY>
</HTML>
I would like to see all the three rows just below each other without any space between them. Cellpaddig and cellspacing is not helping either.
Thanks in advance
Kishan Kumar
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you are assigning the cell a height which is not allowing them to be any closer....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic