Jump to content

Display resuls like this with different color?


$php_mysql$

Recommended Posts

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]

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>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.