Get rid of that evaluate, it's unneeded: <style> tr.alt1 { background-color: #fff; } tr.alt0 { background-color: #ffc; } </style> <cfoutput> <table> <cfloop query="myQuery"> <tr class="alt#currentRow MOD 2#"> ... </tr> </cfloop> </table> </cfoutput>
On Tue, 2 Nov 2004 11:42:55 -0700, Jim McAtee <[EMAIL PROTECTED]> wrote: > I generally start by setting up two CSS classes, with similar names ending > in 0/1. > > <style type="text/css"> > tr.rowstyle1 { > background-color: #ffffff; > } > tr.rowstyle0 { > background-color: #e0e0e0; > } > </style> > <cfoutput> > <cfloop query="somequery"> > <tr class="rowstyle#Evaluate('somequery.currentrow mod 2')#"> > ... > </tr> > </cfloop> > </cfoutput> > > Or you can use IIf() if not using CSS: > > <cfoutput> > <cfloop query="somequery"> > <tr background="#IIf(somequery.currentrow mod 2, DE('##ffffff'), > DE('##e0e0e0'))#"> > ... > </tr> > </cfloop> > </cfoutput> > > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/blog/ I currently have 0 GMail invites for the taking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Sams Teach Yourself Regular Expressions in 10 Minutes by Ben Forta http://www.houseoffusion.com/banners/view.cfm?bannerid=40 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183171 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54