$php_mysql$ Posted August 31, 2010 Share Posted August 31, 2010 can someone show me how is this done like on the forum topic resuls here, one row is red and then other is green? i want fields like this image title type date i want one row to be different color and other to be different. i have taken a screen shot of forum here, hope someone can help me? [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/212204-display-resuls-like-this-with-different-color/ Share on other sites More sharing options...
wildteen88 Posted August 31, 2010 Share Posted August 31, 2010 Basically each table cell/row is given a different background colour with css. A simple example <style type="text/css"> .odd { background-color: #e7eaef; } .even { background-color: #cacdd3; } </style> <table border="0" cellpadding="5" cellspacing="1"> <tr> <td class="odd">xxx</td> <td class="even">xxx</td> <td class="odd">xxxx</td> <td class="even">xxx</td> </tr> <tr> <td class="odd">xxx</td> <td class="even">xxxx</td> <td class="odd">xxx</td> <td class="even">xxx</td> </tr> <tr> <td class="odd">xxxx</td> <td class="even">xxxx</td> <td class="odd">xxxx</td> <td class="even">xxxx</td> </tr> </table> Quote Link to comment https://forums.phpfreaks.com/topic/212204-display-resuls-like-this-with-different-color/#findComment-1105775 Share on other sites More sharing options...
$php_mysql$ Posted August 31, 2010 Author Share Posted August 31, 2010 thanks :-) it helped me understand it. Quote Link to comment https://forums.phpfreaks.com/topic/212204-display-resuls-like-this-with-different-color/#findComment-1105788 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.