title: CSS table alternate row colors and hover colors
body: <p>I have a table with class table. The only styling so far is the table th. I'd like to use a CSS value to alternate between white and silver for the rows, and hover silver for the entire row. Does anyone have the code for that?</p>
  
  <hr>
  
  <pre><code>&lt;table class='table'&gt;
    &lt;tr&gt;
     &lt;th&gt;heading&lt;/th&gt;
     &lt;th&gt;heading 2&lt;/th&gt;
     &lt;th&gt;heading 3&lt;/th&gt;
    &lt;/tr&gt;
    &lt;tr class='table'&gt;
      &lt;td&gt;col 1&lt;/td&gt;
      &lt;td&gt;col 2&lt;/td&gt;
      &lt;td&gt;col 3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class='table'&gt;
      &lt;td&gt;col 1&lt;/td&gt;
      &lt;td&gt;col 2&lt;/td&gt;
      &lt;td&gt;col 3&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr class='table'&gt;
      &lt;td&gt;col 1&lt;/td&gt;
      &lt;td&gt;col 2&lt;/td&gt;
      &lt;td&gt;col 3&lt;/td&gt;
    &lt;/tr&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>That is the html example (as it's written in php)</p>
  
  <p>CSS</p>
  
  <pre><code>.table {
  background-color: #FFFFFF;
  color: #000000;
  }
  
  .table th {
  background-color: #333333;
  color: #FFFFFF;
  }
  </code></pre>
  
  <p>That's it so far. Looking for the values to use for I'm guessing the table tr css.</p>
  
  <hr>
  
  <p>Saying different because even/odd doesn't work &amp; it's dynamic php not strict html.</p>