CyberGuru
09-26-2001, 04:52 PM
I'm creating my own shopping cart in ColdFusion, but I've hit a small snag. How do I get table rows to alternate background colors using the CFOUTPUT tag?
Thanks,
~CG
Thanks,
~CG
|
Time: ![]() US$10 per year - Save $100s!
The Fabulously Unfair WebX Auction Bar. For Ebay etc. Ro-Sham-Bo the opposition. Laugh like Eric Cartman when you win! CLICK HERE NOW! More information and sign-up. WebXpertz Hosting.
Custom fit from $5pm. PHP/MySQL You'll save money, we'll save money. Seems fair to me. Interested? If so Please PM me here and tell me what you need. Thanks!
|
For continued disscussion on this topic : Shopping Cart CyberGuru 09-26-2001, 04:52 PM I'm creating my own shopping cart in ColdFusion, but I've hit a small snag. How do I get table rows to alternate background colors using the CFOUTPUT tag? Thanks, ~CG jonsteele 09-26-2001, 10:57 PM Try something like: (assuming you have a query) <cfoutput query="MyQuery"> <tr bgcolor="#IIf(CurrentRow MOD 2,DE('blue'),DE('red'))#"><td>#Column#</td></tr> </cfoutput> You can replace blue and red with the colors you want. You can also do the same thing with a loop (using the counter index instead of CurrentRow). Jon vBulletin® v3.6.4, Copyright ©2000-2008, Jelsoft Enterprises Ltd.
|