Alternating Row Colors


/ Published in: ColdFusion
Save to your folder(s)

alternating row color snippet for outputting query results in a html table


Copy this code and paste it in your HTML
  1. <cfoutput query="q">
  2. <cfset variables.n = CurrentRow MOD 2 + 1>
  3. <tr><td class="row#variables.n#">...</td></tr>
  4. </cfoutput>

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.