I do something like this...
Define a couple of styles for even and odd rows:
<style type="text/css">
.evenRow { background-color: #ffff99 }
.oddRow { background-color: #cc99ff }
</style>
Then when running the query, figure out which one to use
based on the row you are on:
<cfoutput query="qMyQuery">
<cfif (qMyQuery.currentRow MOD 2) is 0>
<cfset variables.classRow = "evenRow">
<else>
<cfset variables.classRow = "oddRow">
</cfif>
<tr class="#variables.classRow#">
.....
</tr>
</cfoutput>
Craig
> -----Original Message-----
> From: Joshua Tipton [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 2:40 PM
> To: CF-Talk
> Subject: Row Color
>
> How do I make a tr tag change for every row. I would like alternating row
> colors.
>
> Joshua Tipton
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists