CodeIgniter Forums
Altering table bg color - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Altering table bg color (/thread-11315.html)



Altering table bg color - El Forum - 09-03-2008

[eluser]NateL[/eluser]
I'm outputting comments that are made on a specific blog entry and I would like to alter the background color of each comment. Is this something I can do with the HTML helper? Thanks for any assistance Smile


Altering table bg color - El Forum - 09-03-2008

[eluser]Pascal Kriete[/eluser]
There's a function called alternator in the string helper.
You could use that in your loop to switch between two css classes.


Altering table bg color - El Forum - 09-03-2008

[eluser]NateL[/eluser]
Kudos to you :-)