title: Yii gridview change cell background color
body: <p>I would like to change background color in a (bootstrap) grid in yii, depending on compared cell values.
  It took me a while to figure out where do I even have to place CSS class to get something - .../protected/css/styles.css:</p>
  
  <pre><code>.notice {
      background:#FFF6BF;
      color:#514721;
  }
  </code></pre>
  
  <p>I hope this is the right place.
  In my grid:</p>
  
  <pre><code>'columns' =&gt; array(
      ...
      array(
          'name' =&gt; 'Pcs',
          'cssClassExpression' =&gt; '$data["Pcs"] &lt;&gt; $data["Pcs"] ? "notice" : ""',
      ),
  </code></pre>
  
  <p>this way, my css definition is applied only in every second row. I've read a lot about this in different topics: <a href="http://www.yiiframework.com/wiki/501/cgridview-add-custom-class-to-table-rows-preserving-original-odd-and-even/" rel="nofollow">CGridView. Add custom class to table rows preserving original „odd“ and „even“</a> and also here in stackoverflow.com.
  I know there are "odd" and "even" rows, but I still don't get the picture. I've tried to manually change rowCssClassExpression</p>
  
  <pre><code>'rowCssClassExpression' =&gt; '',
  </code></pre>
  
  <p>because I thought if I disable basic yii row coloring, my css will apply, and in html source I can see there are proper class definitions for each row, but still, rows background color remained the same. What should I do to make it work?
  Thanks a lot!</p>