Hi,
How do I minimize the spaces between table rows? The table is not compact if I use Netscape, the spaces between the rows are huge. IE displays the table just great.
Hi tleish,
Here is the code. I don't know what setting was set and where to find it.
The code is distorted because of the width of this message board. I hope you can read it OK.
<CFLOOP INDEX="Num" FROM="1" TO="1">
<CFOUTPUT>
<!--- Setting Table border around CONTACT CELLS
Make whole contact cell a single row
--->
<Tr>
<td>
<Table border>
<!--- Setting table border --->
<tr>
<td>
<table>
<!--- BEGIN CONTACT CELLS --->
<TR>
<TD>
<TABLE>
<!--- BEGIN CONTACT FIRST ROW CELLS --->
<TR>
<TD> CONTACT
</TD>
<!--- BEGIN CONTACT ID CELLS --->
<TD CLASS="formstyle" ALIGN="left" VALIGN="top" >
<TABLE>
<TR>
<CFIF (attributes.formAction IS "UPDATE" AND (attributes.bAdmin Is True)>
<CFIF attributes.formAction Is "INSERT">
<TD>
<CFINPUT TYPE="TEXT" NAME="contact_first_name#Num#" SIZE=15 MAXLENGTH=15>
</CFIF>
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE">
<TD VALIGN="middle">
<INPUT TYPE="Hidden" NAME="contact_first_name#Num#" VALUE="#Trim(ContactInfo.first_name)#">
<DIV CLASS="formfield">#Trim(ContactInfo.first_name)#</DIV>
</CFIF>
</TD>
</TR>
</TABLE>
</TD>
<!--- END ContactLastName CELLS --->
</TR>
</TABLE>
</TD>
</TR>
<!--- END FORM SECOND ROW --->
<!--- BEGIN FORM THIRD ROW --->
<TR>
<TD>
<TABLE>
<TR>
<!--- BEGIN Title CELLS --->
<TD CLASS="formstyle" ALIGN="left" VALIGN="top" >
<TABLE>
<TR>
<TD VALIGN="middle">
<DIV CLASS="formlabel">Title:</DIV>
</TD>
<CFIF (attributes.formAction Is "UPDATE" AND (attributes.bAdmin Is TRUE)>
<TD>
<CFINPUT TYPE="TEXT" NAME="title#Num#" VALUE="#Trim(ContactInfo.title)#" SIZE=30 MAXLENGTH=30 REQUIRED="NO">
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE">
<TD VALIGN="middle">
<INPUT TYPE="Hidden" NAME="title#Num#" VALUE="#Trim(ContactInfo.title)#">
<DIV CLASS="formfield">#Trim(ContactInfo.title)#</DIV>
</CFIF>
</TD>
</TR>
</TABLE>
</TD>
<!--- END Title CELLS --->
</TR>
</TABLE>
</TD>
</TR>
<!--- END FORM CONTACT THIRD ROW --->
<!--- BEGIN FORM THIRD ROW --->
<TR>
<TD>
<TABLE>
<TR>
<!--- BEGIN City CELLS --->
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE">
<TD VALIGN="middle">
<INPUT TYPE="Text" NAME="City" VALUE="#Trim(ContactInfo.city)#">
<DIV CLASS="formfield">#Trim(ContactInfo.city)#</DIV>
</CFIF>
</TD>
</TR>
</TABLE>
</TD>
<!--- END cityCELLS --->
</TR>
</TABLE>
</TD>
</TR>
<!--- END FORM CONTACT THIRD ROW --->
<!--- BEGIN FORM CONTACT FOURTH ROW --->
<TR>
<TD>
<TABLE>
<TR>
<!--- BEGIN zip CELLS --->
<TD CLASS="formstyle" ALIGN="left" VALIGN="top" >
<TABLE>
<TR>
<TD VALIGN="middle">
<DIV CLASS="formlabel">Zip:</DIV>
</TD>
<CFIF (attributes.formAction Is "UPDATE" AND (attributes.bAdmin Is TRUE)>
<TD>
<CFINPUT TYPE="TEXT" NAME="zip" VALUE="#Trim(ContactInfo.zip)#" SIZE=10 MAXLENGTH=10 REQUIRED="YES"
MESSAGE="The Permit Number cannot be blank."
onBlur="this.value = trimStr(this.value) ;">
</CFIF>
<CFIF attributes.formAction Is "INSERT">
<TD>
<CFINPUT TYPE="TEXT" NAME="zip" SIZE=10 MAXLENGTH=10 REQUIRED="YES"
MESSAGE="The Permit Number cannot be blank."
onBlur="this.value = trimStr(this.value) ;">
</CFIF>
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE">
<TD VALIGN="middle">
<INPUT TYPE="Hidden" NAME="zip" VALUE="#Trim(ContactInfo.zip)#">
<DIV CLASS="formfield">#Trim(ContactInfo.zip)#</DIV>
</CFIF>
</TD>
</TR>
</TABLE>
</TD>
<!--- END zip CELLS --->
</TR>
</TABLE>
</TD>
</TR>
<!--- END FORM CONTACT FIRST ROW --->
<!--- BEGIN FORM CONTACT FOURTH ROW --->
<TR>
<TD>
<TABLE>
<TR>
<!--- BEGIN Role CELLS --->
<TD CLASS="formstyle" ALIGN="left" VALIGN="top" >
<TABLE>
<TR>
<TD VALIGN="middle">
<DIV CLASS="formlabel">Role:</DIV>
</TD>
<CFIF (attributes.formAction Is "UPDATE" AND (attributes.bAdmin Is TRUE)>
<TD>
<CFSET suprSel=0>
<CFSET nLpIndx = 0>
<CFLOOP QUERY="AffilType">
<CFSET nLpIndx = nLpIndx + 1>
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE">
<TD VALIGN="middle">
<INPUT TYPE="Hidden" NAME="Group" VALUE="#Trim(ContactInfo.affil_typ)#">
<DIV CLASS="formfield">#Trim(ContactInfo.affil_typ)#</DIV>
</CFIF>
</TD>
</TR>
</TABLE>
</TD>
<!--- END Group CELLS --->
</TR>
</TABLE>
</TD>
</TR>
You can modify the CELLPADDING and the CELLSPACING, if it's not included in the <TABLE> tag then each browser has a default for each. Below is your code modified with the cellpadding and cellspacing for each table set to 0, but that may be a little extreme, you may have to play around with it a bit.
<CFLOOP INDEX="Num" FROM="1" TO="1"> <CFOUTPUT> <!--- Setting Table border around CONTACT CELLS
Make whole contact cell a single row
---> <Tr> <td> <Table CELLPADDING="0" CELLSPACING="0"> <!--- Setting table border ---> <tr> <td> <TABLE CELLPADDING="0" CELLSPACING="0"> <!--- BEGIN CONTACT CELLS ---> <TR> <TD> <TABLE CELLPADDING="0" CELLSPACING="0"> <!--- BEGIN CONTACT FIRST ROW CELLS ---> <TR> <TD> CONTACT </TD>
<!--- BEGIN CONTACT ID CELLS ---> <TD CLASS="formstyle" ALIGN="left" VALIGN="top" > <TABLE CELLPADDING="0" CELLSPACING="0"> <TR> <CFIF (attributes.formAction IS "UPDATE") AND (attributes.bAdmin Is True)>
<CFIF attributes.formAction Is "INSERT"> <TD> <CFINPUT TYPE="TEXT" NAME="contact_first_name#Num#" SIZE=15 MAXLENGTH=15>
</CFIF>
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE")> <TD VALIGN="middle"> <INPUT TYPE="Hidden" NAME="contact_first_name#Num#" VALUE="#Trim(ContactInfo.first_name)#"> <DIV CLASS="formfield">#Trim(ContactInfo.first_name)#</DIV> </CFIF> </TD> </TR> </TABLE> </TD> <!--- END ContactLastName CELLS --->
</TR> </TABLE> </TD> </TR> <!--- END FORM SECOND ROW --->
<!--- BEGIN FORM THIRD ROW ---> <TR> <TD> <TABLE CELLPADDING="0" CELLSPACING="0"> <TR>
<!--- BEGIN Title CELLS ---> <TD CLASS="formstyle" ALIGN="left" VALIGN="top" > <TABLE CELLPADDING="0" CELLSPACING="0"> <TR> <TD VALIGN="middle"> <DIV CLASS="formlabel">Title:</DIV> </TD>
<CFIF (attributes.formAction Is "UPDATE") AND (attributes.bAdmin Is TRUE)> <TD> <CFINPUT TYPE="TEXT" NAME="title#Num#" VALUE="#Trim(ContactInfo.title)#" SIZE=30 MAXLENGTH=30 REQUIRED="NO">
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE")> <TD VALIGN="middle"> <INPUT TYPE="Hidden" NAME="title#Num#" VALUE="#Trim(ContactInfo.title)#"> <DIV CLASS="formfield">#Trim(ContactInfo.title)#</DIV> </CFIF> </TD> </TR> </TABLE> </TD> <!--- END Title CELLS --->
</TR> </TABLE> </TD> </TR> <!--- END FORM CONTACT THIRD ROW ---> <!--- BEGIN FORM THIRD ROW ---> <TR> <TD> <TABLE CELLPADDING="0" CELLSPACING="0"> <TR> <!--- BEGIN City CELLS --->
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE")> <TD VALIGN="middle"> <INPUT TYPE="Text" NAME="City" VALUE="#Trim(ContactInfo.city)#"> <DIV CLASS="formfield">#Trim(ContactInfo.city)#</DIV> </CFIF> </TD> </TR> </TABLE> </TD> <!--- END cityCELLS --->
</TR> </TABLE> </TD> </TR> <!--- END FORM CONTACT THIRD ROW ---> <!--- BEGIN FORM CONTACT FOURTH ROW ---> <TR> <TD> <TABLE CELLPADDING="0" CELLSPACING="0"> <TR>
<!--- BEGIN zip CELLS ---> <TD CLASS="formstyle" ALIGN="left" VALIGN="top" > <TABLE CELLPADDING="0" CELLSPACING="0"> <TR> <TD VALIGN="middle"> <DIV CLASS="formlabel">Zip:</DIV> </TD>
<CFIF (attributes.formAction Is "UPDATE") AND (attributes.bAdmin Is TRUE)> <TD> <CFINPUT TYPE="TEXT" NAME="zip" VALUE="#Trim(ContactInfo.zip)#" SIZE=10 MAXLENGTH=10 REQUIRED="YES"
MESSAGE="The Permit Number cannot be blank."
onBlur="this.value = trimStr(this.value) ;"> </CFIF>
<CFIF attributes.formAction Is "INSERT"> <TD> <CFINPUT TYPE="TEXT" NAME="zip" SIZE=10 MAXLENGTH=10 REQUIRED="YES"
MESSAGE="The Permit Number cannot be blank."
onBlur="this.value = trimStr(this.value) ;"> </CFIF>
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE")> <TD VALIGN="middle"> <INPUT TYPE="Hidden" NAME="zip" VALUE="#Trim(ContactInfo.zip)#"> <DIV CLASS="formfield">#Trim(ContactInfo.zip)#</DIV> </CFIF> </TD> </TR> </TABLE> </TD> <!--- END zip CELLS --->
</TR> </TABLE> </TD> </TR> <!--- END FORM CONTACT FIRST ROW --->
<!--- BEGIN FORM CONTACT FOURTH ROW ---> <TR> <TD> <TABLE CELLPADDING="0" CELLSPACING="0"> <TR>
<!--- BEGIN Role CELLS ---> <TD CLASS="formstyle" ALIGN="left" VALIGN="top" > <TABLE CELLPADDING="0" CELLSPACING="0"> <TR> <TD VALIGN="middle"> <DIV CLASS="formlabel">Role:</DIV> </TD>
<CFIF (attributes.formAction Is "UPDATE") AND (attributes.bAdmin Is TRUE)> <TD> <CFSET suprSel=0> <CFSET nLpIndx = 0> <CFLOOP QUERY="AffilType"> <CFSET nLpIndx = nLpIndx + 1>
<CFIF (attributes.formAction Is "UPDATE" AND attributes.bAdmin Is FALSE) Or (attributes.formAction Is "DELETE")> <TD VALIGN="middle"> <INPUT TYPE="Hidden" NAME="Group" VALUE="#Trim(ContactInfo.affil_typ)#"> <DIV CLASS="formfield">#Trim(ContactInfo.affil_typ)#</DIV> </CFIF> </TD> </TR> </TABLE> </TD> <!--- END Group CELLS ---> </TR>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.