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!

<hr> between rows and coloring rows when using <cftable>

Status
Not open for further replies.

josel

Programmer
Joined
Oct 16, 2001
Messages
716
Location
US
Hello everyone!

I just discovered <cftable> and find it easy to use but not easy enoght to figure out how to place a horizontal line between rows and alternate colors ...

Have you got a trick?

Thank you;

josel If you have the knowledge, consult and educate those who need it! - Jose Lerebours
 
The problem with many cf tags is that while they make
things easy to use with quick development. Custom design and development with many of these tags is limited. I generally avoid most of these to do most of the above, but anyway to answer the question :

Have you viewed the <cftable> output?

This tag uses the <pre> tag to fix widths for column spacing. Unless you specify <cftable htmltable>.

I'va had a quick play around and I going to have to suggest going back to HTML tables. i.e.

<cfquery name=&quot;qry&quot;>
select * from table
</cfquery>

<cfset bgcolor0 = &quot;Red&quot;>
<CFSET BGCOLOR1 = &quot;Orange&quot;>

<table>
<cfloop query=&quot;qry&quot;>
<tr>
<td bgcolor=&quot;#EVALUATE(&quot;bgcolor&quot;,CurrentRow MOD 2)#&quot;>
#RowA#
</td>
</tr>
<cfif CurrentRow IS NOT qry.RecordCount>
<tr>
<td style=&quot;height:1px;background-color:blue;&quot;></td>
</tr>
</cfif>
</cfloop>
</table>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top