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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cannot change the height of a table row

Status
Not open for further replies.

jlarysz

Programmer
Nov 8, 2003
12
US
I'm completely stuck trying to make a table row height smaller. I can reduce the font size for label cells but NOT for input cells.

I'd REALLY appreciate some help!

This code is a little more than ordinary - there are some bits of PHP in there.

Here are my styles:

.FormSectionTitle {
font-family: Arial, Helvetica, sans-serif;
font-size: xx-small;
font-weight: bold;
color: #0000FF;
}
.FormErrorMessage {
font-family: Arial, Helvetica, sans-serif;
font-size: xx-small;
font-style: normal;
font-weight: bold;
color: #FF0000;
}
.FormDataEntry {
font-family: Arial, Helvetica, sans-serif;
font-size: xx-small;
font-style: normal;
font-weight: normal;
color: #000000;
line-height: normal;
height: auto;


}
.FormDataError {
font-family: Arial, Helvetica, sans-serif;
font-size: xx-small;
font-style: normal;
font-weight: bold;
color: #FF0000;
line-height: normal;


And here is my code:

<div id=&quot;Layer5&quot; style=&quot;position:absolute; width:780px; height:38px; z-index:7; left: 40px; top: 100px;&quot;>

<table width=&quot;100%&quot; height=&quot;36&quot; border=&quot;0&quot; id=&quot;ProfileTable&quot;>
<tr>

<? // Title ?>
<td width=&quot;6%&quot; class=&quot;FormDataEntry&quot;><div align=&quot;right&quot;>Title*</div></td>
<td width=&quot;11%&quot; class=&quot;FormDataEntry&quot;><SELECT name=&quot;Value_Title&quot;>
<OPTION <? if ( $Title == 'Mr.') { echo ' selected'; } ?> >Mr.</OPTION>
<OPTION <? if ( $Title == 'Mrs.') { echo ' selected'; } ?> >Mrs.</OPTION>
<OPTION <? if ( $Title == 'Ms.') { echo ' selected'; } ?> >Ms.</OPTION>
<OPTION <? if ( $Title == 'Miss') { echo ' selected'; } ?> >Miss</OPTION>
<OPTION <? if ( $Title == 'Dr.') { echo ' selected'; } ?> >Dr.</OPTION>
</SELECT></td>

<? // First Name ?>
<td width=&quot;7%&quot; class=&quot;<? echo ($_SESSION['Error_FirstName']) ? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot; >
<div align=&quot;right&quot;>First*</div>
</td>

<td width=&quot;24%&quot; class=&quot;FormDataEntry&quot;>
<INPUT type=&quot;text&quot; maxLength=34 size=25 name=&quot;Value_FirstName&quot; value=&quot;<? echo $FirstName?>&quot;>
</td>

<? // Middle Name ?>
<td width=&quot;15%&quot; class=&quot;<? echo ($_SESSION['Error_MiddleName'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot; >
<div align=&quot;right&quot;>Middle Initial </div>
</td>

<td width=&quot;10%&quot; class=&quot;FormDataEntry&quot;>
<INPUT type=&quot;text&quot; maxLength=8 size=3 name=&quot;Value_MiddleName&quot; value=&quot;<? echo $MiddleName?>&quot;>
</td>


<? // Last Name ?>
<td width=&quot;6%&quot; class=&quot;<? echo ($_SESSION['Error_LastName'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot; >
<div align=&quot;right&quot;>Last*</div>
</td>

<td width=&quot;21%&quot; class=&quot;FormDataEntry&quot;>
<INPUT maxLength=30 size=25 name=&quot;Value_LastName&quot; value=&quot;<? echo $LastName?>&quot;>
</td>

</tr>
</table>
</div>

<div id=&quot;Layer6&quot; style=&quot;position:absolute; width:783px; height:244px; z-index:7; top: 150px; left: 42px;&quot;>
<table width=&quot;100%&quot; height=&quot;240&quot; border=&quot;0&quot;>
<tr>

<? // Apartment ?>

<td width=&quot;19%&quot; class=&quot;<? echo ($_SESSION['Error_Apartment'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Apartment Number</div>
</td>

<td width=&quot;6%&quot; class=&quot;FormDataEntry&quot;>
<INPUT maxLength=25 size=9 name=&quot;Value_Apartment&quot; value=&quot;<? echo $Apartment?>&quot;>
</td>

<? // Address Line 1 ?>

<td width=&quot;23%&quot; class=&quot;<? echo ($_SESSION['Error_Address1'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Address Line 1*</div>
</td>

<td width=&quot;52%&quot; class=&quot;FormDataEntry&quot;>
<INPUT maxLength=70 size=62 name=&quot;Value_Address1&quot; value=&quot;<? echo $Address1?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // Address Line 2 ?>

<td width=&quot;23%&quot; class=&quot;<? echo ($_SESSION['Error_Address2'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Address Line 2&nbsp;</div>
</td>

<td width=&quot;52%&quot; class=&quot;FormDataEntry&quot;>
<INPUT maxLength=70 size=62 name=&quot;Value_Address2&quot; value=&quot;<? echo $Address2?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // Address Line 3 ?>

<td width=&quot;23%&quot; class=&quot;<? echo ($_SESSION['Error_Address3'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Address Line 3&nbsp;</div>
</td>

<td width=&quot;52%&quot; class=&quot;FormDataEntry&quot;>
<INPUT maxLength=70 size=62 name=&quot;Value_Address3&quot; value=&quot;<? echo $Address3?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // City ?>

<td class=&quot;<? echo ($_SESSION['Error_City'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>City*&nbsp;&nbsp;</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=50 name=&quot;Value_City&quot; value=&quot;<? echo $City?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // County/State ?>

<td class=&quot;<? echo ($_SESSION['Error_County'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>State/County/Department&nbsp;</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=70 name=&quot;Value_County&quot; value=&quot;<? echo $County?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // Postcode ?>

<td class=&quot;<? echo ($_SESSION['Error_PostCode'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Zip/Postcode*</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=20 size=10 name=&quot;Value_PostCode&quot; value=&quot;<? echo $PostCode?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // Country ?>

<td class=&quot;<? echo ($_SESSION['Error_Country'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Country*</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=70 size=40 name=&quot;Value_Country&quot; value=&quot;<? echo $Country?>&quot;>
</td>
</tr>

<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>

<? // eMail address ?>

<td class=&quot;<? echo ($_SESSION['Error_eMail'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Your E-mail address*</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=120 size=62 name=&quot;Value_eMail&quot; value=&quot;<? echo $eMail?>&quot;>
</td>

</tr>
</table>
</div>

<div id=&quot;PhoneNumberTable&quot; style=&quot;position:absolute; width:780px; height:40px; z-index:7; left: 0px; top: 400px;&quot;>
<table width=&quot;100%&quot; height=&quot;35&quot; border=&quot;0&quot;>
<tr>

<? // Home phone number ?>

<td><font color=&quot;#FFFFFF&quot;><strong>Telephone Numbers:</strong></font></td>

<td class=&quot;<? echo ($_SESSION['Error_HomePhone'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Home*</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=60 size=19 name=&quot;Value_HomePhone&quot; value=&quot;<? echo $HomePhone?>&quot;>
</td>

<? // Work Phone ?>

<td class=&quot;<? echo ($_SESSION['Error_WorkPhone'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Work</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=60 size=19 name=&quot;Value_WorkPhone&quot; value=&quot;<? echo $WorkPhone?>&quot;>
</td>

<? // Mobile phone ?>

<td class=&quot;<? echo ($_SESSION['Error_WorkPhone'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Mobile</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT maxLength=60 size=19 name=&quot;Value_MobilePhone&quot; value=&quot;<? echo $MobilePhone?>&quot;>
</td>

</tr>
</table>
</div>

<? // The Password section ?>

<div id=&quot;Layer10&quot; style=&quot;position:absolute; width:980px; height:32px; z-index:7; left: 0px; top: 440px;&quot;>
<hr>
</div>

<div id=&quot;Layer8&quot; style=&quot;position:absolute; width:980px; height:66px; z-index:7; left: 0px; top: 470px;&quot;>
<p class=&quot;FormSectionTitle&quot;>
Your password:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<font color=&quot;#FF0000&quot;><? echo $_SESSION['Error_Message_2']?></font></p>
</div>

<div id=&quot;PasswordEntryLayer&quot; style=&quot;position:absolute; width:980px; height:80px; z-index:7; left: 0px; top: 510px;&quot;>
<table width=&quot;100%&quot; height=&quot;56&quot; border=&quot;0&quot;>
<tr>

<? // The Password ?>

<td width=&quot;48%&quot; class=&quot;<? echo ($_SESSION['Error_Password'] || $_SESSION['Error_Password2']) ? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Choose a password (Anything up to 20 characters)*</div>
</td>

<td width=&quot;52%&quot; class=&quot;FormDataEntry&quot;>
<INPUT id=&quot;Value_Password&quot; type=password maxLength=20 name=&quot;Value_Password&quot;>
</td>
</tr>

<? // Confirm the password ?>

<tr>
<td class=&quot;<? echo ($_SESSION['Error_Password2'])? &quot;FormDataError&quot; : &quot;FormDataEntry&quot;;?>&quot;>
<div align=&quot;right&quot;>Type your password again*</div>
</td>

<td class=&quot;FormDataEntry&quot;>
<INPUT id=&quot;Value_Password2&quot; type=password maxLength=20 name=&quot;Value_Password2&quot;>
</td>
</tr>
</table>
</div>



 
You could set the row height rather than the font size?

<tr height=5></tr>

Transcend
[gorgeous]
 
As far as I know, you can set the font size for every html element (that has any letters). Input boxes are no exception, just do one of the following:

inline:
<input type=&quot;text&quot; style=&quot;font-size: 6pt;&quot; ... />

create a class:
<style>
.small { font-size: 6pt; }
</style>

<input type=&quot;text&quot; class=&quot;small&quot; ... />

Same goes for <select> tags.

 
The style=&quot;&quot; did it. I think that my class structure was clashing in the row, and it was falling back on default values.

Thanks a lot for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top